Mercurial > hg > orthanc-stone
comparison Framework/StoneException.h @ 728:8190213e2279 am-dev
Merged default into am-dev
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 21 May 2019 13:25:58 +0200 |
parents | 28b9e3a54200 |
children | 8e31b174ab26 712ff6ff3c19 |
comparison
equal
deleted
inserted
replaced
690:f185cfcb72a0 | 728:8190213e2279 |
---|---|
111 } | 111 } |
112 }; | 112 }; |
113 | 113 |
114 } | 114 } |
115 | 115 |
116 // See https://isocpp.org/wiki/faq/misc-technical-issues#macros-with-multi-stmts | |
117 // (or google "Multiple lines macro C++ faq lite" if link is dead) | |
118 #define ORTHANC_ASSERT(cond,streamChainMessage) \ | |
119 if (!(cond)) { \ | |
120 std::stringstream sst; \ | |
121 sst << "Assertion failed. Condition = \"" #cond "\" Message = \"" << streamChainMessage << "\""; \ | |
122 std::string sstr = sst.str(); \ | |
123 throw OrthancException(ErrorCode_InternalError,sstr.c_str()); \ | |
124 } else (void)0 | |
125 |