Changeset 1120:5d8d64bde9c5 in lemon-0.x for src/work/klao/error_test.cc
- Timestamp:
- 02/03/05 20:24:42 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1519
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/klao/error_test.cc
r1067 r1120 16 16 } 17 17 catch(lemon::DataFormatError &e) { 18 e. set_file(fn);19 e. set_line(5);18 e.file(fn); 19 e.line(5); 20 20 throw; 21 21 } … … 28 28 parse_file("input.txt"); 29 29 } 30 catch(lemon::Exception &e) { 31 cerr << "Exception '" << e.exceptionName() 32 << "' caught: " << endl; 33 cerr << e.what() << endl; 34 } 30 35 catch(exception &e) { 31 36 cerr << "Exception caught: " << endl; … … 34 39 35 40 try { 41 throw lemon::LogicError(); 42 } 43 catch(lemon::Exception &e) { 44 cerr << "Exception '" << e.exceptionName() 45 << "' caught: " << endl; 46 cerr << e.what() << endl; 47 } 48 49 try { 36 50 fail_assert(); 51 } 52 catch(lemon::Exception &e) { 53 cerr << "Exception '" << e.exceptionName() 54 << "' caught: " << endl; 55 cerr << e.what() << endl; 37 56 } 38 57 catch(exception &e) { … … 40 59 cerr << e.what() << endl; 41 60 } 61 62 cerr << endl; 42 63 43 64 // assert(1==0); … … 47 68 48 69 #undef LEMON_ASSERT_HANDLER 49 #define LEMON_ASSERT_ HANDLER ::lemon::assert_fail_throw70 #define LEMON_ASSERT_EXCEPTION 50 71 51 72 #include <error.h>
Note: See TracChangeset
for help on using the changeset viewer.