equal
deleted
inserted
replaced
18 /// |
18 /// |
19 ///For example |
19 ///For example |
20 ///\code check(0==1,"This is obviously false.");\endcode will |
20 ///\code check(0==1,"This is obviously false.");\endcode will |
21 ///print this (and then exits). |
21 ///print this (and then exits). |
22 ///\verbatim graph_test.cc:123: error: This is obviously false. \endverbatim |
22 ///\verbatim graph_test.cc:123: error: This is obviously false. \endverbatim |
|
23 /// |
|
24 ///\todo It should be in \c error.h |
23 #define check(rc, msg) \ |
25 #define check(rc, msg) \ |
24 if(!(rc)) { \ |
26 if(!(rc)) { \ |
25 std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \ |
27 std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \ |
26 exit(1); \ |
28 exit(1); \ |
27 } else { } \ |
29 } else { } \ |