From 745875139b5ee46e469927d410364bfeeedb2995 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 11 Oct 2006 15:47:45 +0000 Subject: Despite some svn oddness, I'm now moving to a new setup for the tests, that's very much like the original one, but now using build. You will need the latest build in order to build the tests. --- src/tests/exception/exception.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/tests/exception/exception.cpp (limited to 'src/tests/exception') diff --git a/src/tests/exception/exception.cpp b/src/tests/exception/exception.cpp new file mode 100644 index 0000000..6417692 --- /dev/null +++ b/src/tests/exception/exception.cpp @@ -0,0 +1,16 @@ +#include +#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!"); +} -- cgit v1.2.3