aboutsummaryrefslogtreecommitdiff
path: root/src/old/tests/exception.cpp
blob: 641769256371e49b98493311159a5413db853707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include "exceptions.h"

int main()
{
	try
	{
		throw ExceptionBase( 42, "There was an error on line: %d", __LINE__ );
	}
	catch( ExceptionBase &e )
	{
		std::cout << "Error "<< e.getErrorCode() << ": " << e.what() << "\n";
	}

	throw ExceptionBase( 112, "This exception wasn't caught!");
}