#include #include #include #include "date.h" using namespace std; int main() { int status = EXIT_FAILURE; try { date d(date::april, 31, 2014); status = EXIT_SUCCESS; } catch (const date::bad_month& b) { cerr << b << "\n"; } catch (const date::flow& f) { cerr << f << "\n"; } catch (...) { cerr << "Caught unexpected exception.\n"; } return status; }