|
libyui
3.0.10
|
#include <YUIException.h>

Public Member Functions | |
| YUIException () | |
| YUIException (const std::string &msg_r) | |
| virtual | ~YUIException () throw () |
| const YCodeLocation & | where () const |
| void | relocate (const YCodeLocation &newLocation) const |
| const std::string & | msg () const |
| void | setMsg (const std::string &msg) |
| std::string | asString () const |
| virtual const char * | what () const throw () |
Static Public Member Functions | |
| static std::string | strErrno (int errno_r) |
| static std::string | strErrno (int errno_r, const std::string &msg) |
| static void | log (const YUIException &exception, const YCodeLocation &location, const char *const prefix) |
Protected Member Functions | |
| virtual std::ostream & | dumpOn (std::ostream &str) const |
Friends | |
| std::ostream & | operator<< (std::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.
Definition at line 281 of file YUIException.h.
Default constructor. Use YUI_THROW to throw exceptions.
Definition at line 62 of file YUIException.cc.
| YUIException::YUIException | ( | const std::string & | msg_r | ) |
Constructor taking a message. Use YUI_THROW to throw exceptions.
Definition at line 67 of file YUIException.cc.
| YUIException::~YUIException | ( | ) | throw () [virtual] |
Destructor.
Definition at line 74 of file YUIException.cc.
| std::string YUIException::asString | ( | ) | const |
Error message provided by dumpOn as string.
Definition at line 81 of file YUIException.cc.

| std::ostream & YUIException::dumpOn | ( | std::ostream & | str | ) | const [protected, virtual] |
Overload this to print a proper error message.
Reimplemented in YUIIndexOutOfRangeException, YUIInvalidChildException< YWidget >, YUITooManyChildrenException< YWidget >, YUIBadPropertyArgException, YUISetReadOnlyPropertyException, YUIPropertyTypeMismatchException, YUIUnknownPropertyException, and YUIPropertyException.
Definition at line 90 of file YUIException.cc.
| 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.
Definition at line 127 of file YUIException.cc.

| const std::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.
Definition at line 318 of file YUIException.h.
| void YUIException::relocate | ( | const YCodeLocation & | newLocation | ) | const [inline] |
Exchange location on rethrow.
Definition at line 310 of file YUIException.h.
| void YUIException::setMsg | ( | const std::string & | msg | ) | [inline] |
Set a new message string.
Definition at line 324 of file YUIException.h.

| std::string YUIException::strErrno | ( | int | errno_r | ) | [static] |
Make a string from errno_r.
Definition at line 111 of file YUIException.cc.
| std::string YUIException::strErrno | ( | int | errno_r, |
| const std::string & | msg | ||
| ) | [static] |
Make a string from errno_r and msg_r.
Definition at line 118 of file YUIException.cc.

| virtual const char* YUIException::what | ( | ) | const throw () [inline, virtual] |
Return message string.
Reimplemented from std::exception.
Definition at line 354 of file YUIException.h.
| const YCodeLocation& YUIException::where | ( | ) | const [inline] |
Return YCodeLocation.
Definition at line 304 of file YUIException.h.
| std::ostream& operator<< | ( | std::ostream & | str, |
| const YUIException & | obj | ||
| ) | [friend] |
YUIException stream output
Definition at line 104 of file YUIException.cc.