#include <rlog/Error.h>
| Public Member Functions | |
| Error (const char *component, const char *file, const char *function, int line, const char *msg) | |
| Error (const char *component, const char *file, const char *function, int line, const std::string &msg) | |
| Error (const Error &src) | |
| Error & | operator= (const Error &src) | 
| void | log (RLogChannel *channel) const | 
| const char * | component () const | 
| const char * | file () const | 
| const char * | function () const | 
| int | line () const | 
| const char * | message () const | 
Error is derived from std::runtime_error exception and is thrown from rAssert() to indicate the reason and location of the failure.
void testFunc() { bool testAssert = true; rAssert( testAssert == false ); // fails.. } void A() { try { testFunc(); } catch( Error &err ) { rDebug("caught assert failure from %s line %i ( %s )", err.file(), err.line(), err.function() ); } }
| void Error::log | ( | RLogChannel * | channel | ) | const | 
Log the error to the given channel
| const char * Error::component | ( | ) | const | 
return component string. If this was due to an rAssert() then this will be the definition of RLOG_COMPONENT at the point of the rAssert.
 1.5.0
 1.5.0