blob: f911d9ebc3ef93febd627ffc2da8c1bbb1f1a5d0 [file] [log] [blame]
#include <iostream>
#include <stdexcept>
#include "myexception.h"
#include "throwable.h"
int main(int /*argc*/, char** /*argv*/)
{
int result = 0;
std::cout << "call throw_an_exception()" << std::endl;
try {
throw_an_exception();
} catch (my_exception const& e) {
std::cout << "my_exception caught!" << std::endl;
} catch (std::exception const& e) {
std::cout << "ERROR: exception caught!" << std::endl;
result = 1;
}
std::cout << "finished" << std::endl;
return result;
}