#include <error.hpp>

Public Member Functions | |
| Error (const Error &) throw () | |
| Error (std::exception &cause, string description="", const char *id=LUMIERA_ERROR_EXCEPTION) throw () | |
| Error (string description="", const char *id=LUMIERA_ERROR_EXCEPTION) throw () | |
| const char * | getID () const throw () |
| the internal Lumiera-error-ID (was set as C-errorstate in ctor) | |
| const string & | getUsermsg () const throw () |
| extract the message to be displayed for the user | |
| Error & | prependInfo (const string &text) throw () |
| give additional developer info. | |
| const string & | rootCause () const throw () |
| If this exception was caused by a chain of further exceptions, return the description of the first one registered in this throw sequence. | |
| Error & | setUsermsg (const string &newMsg) throw () |
| replace the previous or default friendly message for the user. | |
| virtual const char * | what () const throw () |
| yield a diagnostic message characterizing the problem | |
Static Private Member Functions | |
| static const string | extractCauseMsg (const std::exception &) throw () |
Private Attributes | |
| const string | cause_ |
| descriptoin of first exception encountered in the chain | |
| string | desc_ |
| detailed description of the error situation for the developers | |
| const char * | id_ |
| an LUMIERA_ERROR id, which is set as errorstate on construction | |
| string | msg_ |
| friendly message intended for users (to be localized) | |
| string | what_ |
| buffer for generating the detailed description on demand | |
Definition at line 48 of file error.hpp.
| lumiera::Error::Error | ( | string | description = "", |
|
| const char * | id = LUMIERA_ERROR_EXCEPTION | |||
| ) | throw () |
Definition at line 71 of file error.cpp.
References lumiera_error_set().
00072 : std::exception (), 00073 id_ (id), 00074 msg_ (error::default_usermsg (this)), 00075 desc_ (description), 00076 cause_ ("") 00077 { 00078 lumiera_error_set (this->id_); 00079 }

| lumiera::Error::Error | ( | const Error & | ref | ) | throw () |
| Error& lumiera::Error::prependInfo | ( | const string & | text | ) | throw () [inline] |
| const string& lumiera::Error::rootCause | ( | ) | const throw () [inline] |
This works only if every exceptions thrown as a consequence of another exception is propperly constructed by passing the original exception to the constructor
Definition at line 73 of file error.hpp.
References cause_.
00073 { return this->cause_; }
| Error& lumiera::Error::setUsermsg | ( | const string & | newMsg | ) | throw () [inline] |
| const char * lumiera::Error::what | ( | ) | const throw () [virtual] |
Description of the problem, including the internal char constant in accordance to Lumiera's error identification scheme.
If a root cause can be obtained, this will be included in the generated output as well.
Definition at line 111 of file error.cpp.
References cause_, desc_, id_, and what_.
Referenced by asset::DB::clear().
00112 { 00113 if (isnil (this->what_)) 00114 { 00115 what_ = string(id_); 00116 if (!isnil (desc_)) what_ += " ("+desc_+")."; 00117 if (!isnil (cause_)) what_ += string(" -- caused by: ") + cause_; 00118 } 00119 return what_.c_str(); 00120 }

1.5.5