16 #define IU_ASSERT(C) \
20 fprintf(stderr, "%s(%d) : assertion '%s' failed!\n", \
21 __FILE__, __LINE__, #C ); \
35 IuException(
const std::string& msg,
const char* file=NULL,
const char*
function=NULL,
int line=0)
throw():
41 std::ostringstream out_msg;
43 out_msg <<
"IuException: ";
44 out_msg << (msg_.empty() ?
"unknown error" : msg_) <<
"\n";
45 out_msg <<
" where: ";
46 out_msg << (file_.empty() ?
"no filename available" : file_) <<
" | ";
47 out_msg << (function_.empty() ?
"unknown function" : function_) <<
":" << line_;
54 virtual const char* what()
const throw()
61 std::string function_;
68 IU_INTERPOLATE_NEAREST,
70 } IuInterpolationType;
78 static inline unsigned int divUp(
unsigned int a,
unsigned int b)
80 return (a % b != 0) ? (a / b + 1) : (a / b);
Exceptions with additional error information.
Definition: coredefs.h:32