equal
deleted
inserted
replaced
35 /// |
35 /// |
36 ///For example |
36 ///For example |
37 ///\code check(0==1,"This is obviously false.");\endcode will |
37 ///\code check(0==1,"This is obviously false.");\endcode will |
38 ///print something like this (and then exits). |
38 ///print something like this (and then exits). |
39 ///\verbatim file_name.cc:123: error: This is obviously false. \endverbatim |
39 ///\verbatim file_name.cc:123: error: This is obviously false. \endverbatim |
40 #define check(rc, msg) \ |
40 #define check(rc, msg) \ |
41 if(!(rc)) { \ |
41 { \ |
42 std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \ |
42 if(!(rc)) { \ |
43 abort(); \ |
43 std::cerr << __FILE__ ":" << __LINE__ << ": error: " \ |
44 } else { } \ |
44 << msg << std::endl; \ |
|
45 abort(); \ |
|
46 } else { } \ |
|
47 } \ |
|
48 |
45 |
49 |
46 #endif |
50 #endif |