Intuitive Software Development in C++
#include <iostream>
class Ball
{
public:
Ball()
{
std::cout << "Throwing Ball!\n";
}
};
int main(int argc, char* argv[])
{
try
{
throw Ball();
}
catch (Ball)
{
std::cout << "caught!";
}
std::cin.get();
return 0;
}