|
libyui
|
#include <YUIException.h>
Public Member Functions | |
| YUIException () | |
| YUIException (const string &msg_r) | |
| virtual | ~YUIException () throw () |
| const YCodeLocation & | where () const |
| void | relocate (const YCodeLocation &newLocation) const |
| const string & | msg () const |
| void | setMsg (const string &msg) |
| string | asString () const |
| virtual const char * | what () const throw () |
Static Public Member Functions | |
| static string | strErrno (int errno_r) |
| static string | strErrno (int errno_r, const string &msg) |
| static void | log (const YUIException &exception, const YCodeLocation &location, const char *const prefix) |
Protected Member Functions | |
| virtual ostream & | dumpOn (ostream &str) const |
Friends | |
| ostream & | operator<< (ostream &str, const YUIException &obj) |
Base class for UI Exceptions.
Exception offers to store a message string passed to the constructor. Derived classes may provide additional information. Overload dumpOn to provide a proper error text.
| YUIException::YUIException | ( | ) |
Default constructor. Use YUI_THROW to throw exceptions.
| YUIException::YUIException | ( | const string & | msg_r | ) |
Constructor taking a message. Use YUI_THROW to throw exceptions.
| YUIException::~YUIException | ( | ) | throw () [virtual] |
Destructor.
| string YUIException::asString | ( | ) | const |
Error message provided by dumpOn as string.
| ostream & YUIException::dumpOn | ( | ostream & | str | ) | const [protected, virtual] |
Overload this to print a proper error message.
Reimplemented in YUIPropertyException, YUIUnknownPropertyException, YUIPropertyTypeMismatchException, YUISetReadOnlyPropertyException, YUIBadPropertyArgException, YUITooManyChildrenException< YWidget >, YUIInvalidChildException< YWidget >, and YUIIndexOutOfRangeException.
| void YUIException::log | ( | const YUIException & | exception, |
| const YCodeLocation & | location, | ||
| const char *const | prefix | ||
| ) | [static] |
Drop a log line on throw, catch or rethrow. Used by YUI_THROW macros.
| const string& YUIException::msg | ( | ) | const [inline] |
Return the message string provided to the constructor. Note: This is not neccessarily the complete error message. The whole error message is provided by asString or dumpOn.
| void YUIException::relocate | ( | const YCodeLocation & | newLocation | ) | const [inline] |
Exchange location on rethrow.
| void YUIException::setMsg | ( | const string & | msg | ) | [inline] |
Set a new message string.
| string YUIException::strErrno | ( | int | errno_r | ) | [static] |
Make a string from errno_r.
| string YUIException::strErrno | ( | int | errno_r, |
| const string & | msg | ||
| ) | [static] |
Make a string from errno_r and msg_r.
| virtual const char* YUIException::what | ( | ) | const throw () [inline, virtual] |
Return message string.
Reimplemented from std::exception.
| const YCodeLocation& YUIException::where | ( | ) | const [inline] |
Return YCodeLocation.
| ostream& operator<< | ( | ostream & | str, |
| const YUIException & | obj | ||
| ) | [friend] |
YUIException stream output
1.7.3