|
Honeycomb
0.1
Component-Model Framework
|
Base exception class. Exceptions inherited from this class provide debug info and can be thrown polymorphically (unlike standard c++ exceptions). More...
#include <Exception.h>


Classes | |
| struct | MsgStream |
| Custom error message builder. More... | |
| struct | Raiser |
| Helper to raise an exception after the right side of ^ has been evaluated. More... | |
| struct | Source |
| Info about source where exception was thrown. More... | |
Public Member Functions | |
| Exception ()=default | |
| Exception (const Exception &rhs) | |
| Exception & | operator= (const Exception &rhs) |
| const Source & | source () const |
| Get info about source where exception was thrown. More... | |
| const String & | message () const |
| Get custom error message. The error message can be appended to using global operator<<(Exception, String) More... | |
| const char * | what () const throw () |
| Get full diagnostic message. More... | |
| template<class T > | |
| MsgStream | operator<< (T &&val) |
| Append custom error message. More... | |
Public Member Functions inherited from honey::SharedObj< Exception > | |
| SharedObj (Alloc &&a=Alloc()) debug_if( | |
| Construct with allocator that is called to deallocate this shared object when all references have been released. More... | |
Static Public Member Functions | |
| static Ptr | current () |
| Create a clone of the current exception caught with (...) More... | |
Protected Member Functions | |
| virtual String | createWhat () const |
| Create what message. Called only on demand and result is cached. More... | |
Protected Member Functions inherited from honey::SharedObj< Exception > | |
| void | finalize () |
| Destroys object. Called when strong reference count reaches 0. May be overridden to prevent destruction. More... | |
Friends | |
| ostream & | operator<< (ostream &os, const Exception &e) |
Base exception class. Exceptions inherited from this class provide debug info and can be thrown polymorphically (unlike standard c++ exceptions).
All exceptions must inherit from this class and throw_ should be used instead of the throw keyword.
Default constructed exceptions are fast and lean (no overhead).
Example:
struct MyExA : Exception { EXCEPTION(MyExA) };
struct MyExB : MyExA { EXCEPTION(MyExB) };
{
throw_ MyExB() << "Optional Message"; //throw_ directly
MyExA::Ptr a = new MyExB;
throw_ *a << "Error"; //throw_ polymorphically from base class, catch (MyExB& e)
}
|
default |
|
inline |
|
inlineprotectedvirtual |
Create what message. Called only on demand and result is cached.
|
inlinestatic |
Create a clone of the current exception caught with (...)
|
inline |
Get custom error message. The error message can be appended to using global operator<<(Exception, String)
|
inline |
Append custom error message.
|
inline |
Get info about source where exception was thrown.
|
inline | |||||||||||||
Get full diagnostic message.
|
friend |
1.8.10