Exception base class. More...
#include <XBase.h>
Inherited by XConfigRead, XIO, XMT, XScreen, XSocket, and XSynergy.
Public Member Functions | |
| XBase () | |
| Use getWhat() as the result of what(). | |
| XBase (const CString &msg) | |
Use msg as the result of what(). | |
| virtual const char * | what () const |
| Reason for exception. | |
Protected Member Functions | |
| virtual CString | getWhat () const =0 throw () |
| Get a human readable string describing the exception. | |
| virtual CString | format (const char *id, const char *defaultFormat,...) const throw () |
| Format a string. | |
Exception base class.
This is the base class of most exception types.
Definition at line 28 of file XBase.h.
| CString XBase::format | ( | const char * | id, | |
| const char * | defaultFormat, | |||
| ... | ||||
| ) | const throw () [protected, virtual] |
Format a string.
Looks up a message format using id, using defaultFormat if no format can be found, then replaces positional parameters in the format string and returns the result.
Definition at line 55 of file XBase.cpp.
References CStringUtil::vformat().
Referenced by XExitApp::getWhat(), XUnknownClient::getWhat(), XDuplicateClient::getWhat(), XIncompatibleClient::getWhat(), XSocketCreate::getWhat(), XSocketConnect::getWhat(), XSocketBind::getWhat(), XSocketIOClose::getWhat(), XSocketAddress::getWhat(), XScreenUnavailable::getWhat(), XScreenOpenFailure::getWhat(), XMTThreadUnavailable::getWhat(), XIOWouldBlock::getWhat(), XIOEndOfStream::getWhat(), XIOClosed::getWhat(), XIOReadMismatch::getWhat(), and XConfigRead::getWhat().
1.7.1