defuze.me
Client
|
This is the default defuze.me exception class. More...
#include <exception.hpp>
Public Member Functions | |
Exception (unsigned code, const QString msg, const char *file="unknow file", const int line=0) | |
Exception (const Exception &src) | |
void | raise () const |
Exception * | clone () const |
void | extractCore () throw () |
Extract the core from file path. | |
void | generateCode () throw () |
Generate a hashcode (4 hex digits) for the error based on file and line number so we have a "unique" code to reference the error and it makes support easier. | |
void | formatOutput () throw () |
Format a nice looking output string from given parameters. | |
QString | hexCode () const throw () |
Return the error uniq hex code (4 digits) | |
QString | description () const throw () |
Return a debug string containing all available infos. | |
QString | msg () const throw () |
Return a simple message (for user) | |
Protected Attributes | |
QString | _msg |
QString | file |
QString | module |
unsigned | userCode |
unsigned | code |
unsigned | line |
This is the default defuze.me exception class.
It can be used directly or inherited if you want to change the behaviour.
It might be used from the "throw_exception" define to provide automatic filename and line number
This class will automatically detect thanks to the file path from which Core the exception is raised from, and display it.
Definition at line 26 of file exception.hpp.
void Exception::extractCore | ( | ) | throw () |
Extract the core from file path.
ie: client/core/db/location.cpp => DbCore
Definition at line 57 of file exception.cpp.