This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | _ERROR_H 1 |
| #define | __ASSERT_FUNCTION __PRETTY_FUNCTION__ |
| #define | fail_neg(eval) real_fail_neg (eval, #eval, __ASSERT_FUNCTION, __FILE__, __LINE__) |
| #define | fail_null(eval) real_fail_null (eval, #eval, __ASSERT_FUNCTION, __FILE__, __LINE__) |
| #define | fail_if(eval) real_fail_if (eval, #eval, __ASSERT_FUNCTION, __FILE__, __LINE__) |
Functions | |
| void | real_fail_neg (int eval, const char *eval_str, const char *func, const char *file, int line) |
| void | real_fail_null (const void *eval, const char *eval_str, const char *func, const char *file, int line) |
| error handler for NULL result codes | |
| void | real_fail_if (bool eval, const char *eval_str, const char *func, const char *file, int line) |
| void | sigpipe_clear () |
| int | sigpipe_get () |
|
|
|
|
|
|
|
|
|
|
Definition at line 37 of file error.h. Referenced by AVIHandler::Create(), and AVIHandler::Open(). |
|
||||||||||||||||||||||||
|
Definition at line 88 of file error.cc. 00089 {
00090 if ( eval == true )
00091 {
00092
00093 string exc;
00094 ostringstream sb;
00095
00096 sb << file << ":" << line << ": In function \"" << func << "\": condition \"" << eval_str << "\" is true";
00097 if ( errno != 0 )
00098 sb << endl << file << ":" << line << ": errno: " << errno << " (" << strerror( errno ) << ")";
00099 sb << ends;
00100 exc = sb.str();
00101 cerr << exc << endl;
00102 throw exc;
00103 }
00104 }
|
|
||||||||||||||||||||||||
|
Definition at line 47 of file error.cc. 00048 {
00049 if ( eval < 0 )
00050 {
00051 string exc;
00052 ostringstream sb;
00053
00054 sb << file << ":" << line << ": In function \"" << func << "\": \"" << eval_str << "\" evaluated to " << eval;
00055 if ( errno != 0 )
00056 sb << endl << file << ":" << line << ": errno: " << errno << " (" << strerror( errno ) << ")";
00057 sb << ends;
00058 exc = sb.str();
00059 cerr << exc << endl;
00060 throw exc;
00061 }
00062 }
|
|
||||||||||||||||||||||||
|
error handler for NULL result codes Whenever this is called with a NULL argument, it will throw an exception. Typically used with functions like malloc() and new(). Definition at line 72 of file error.cc. 00073 {
00074 if ( eval == NULL )
00075 {
00076
00077 string exc;
00078 ostringstream sb;
00079
00080 sb << file << ":" << line << ": In function \"" << func << "\": " << eval_str << " is NULL" << ends;
00081 exc = sb.str();
00082 cerr << exc << endl;
00083 throw exc;
00084 }
00085 }
|
|
|
1.4.2