blob: 33dcd5eb7a0be5da6e4049e1810ba9ac24435776 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <iostream>
#include "exception.h"
int main()
{
try
{
throw Exception( 42, "There was an error on line: %d", __LINE__ );
}
catch( Exception &e )
{
std::cout << "Error "<< e.getErrorCode() << ": " << e.what() << "\n";
}
throw Exception( 112, "This exception wasn't caught!");
}
|