#include <Exception>
Inherits std::exception.
Public Member Functions | |
| Exception (std::string msg) | |
| Constructor awaiting your error message as a std::string. | |
| Exception (const char *msg) | |
| Constructor specially for using standard exception handling like bad_alloc or similiar. | |
| virtual | ~Exception () throw () |
| Virtual standard destructor who must be disallowed to throw exceptions. | |
| virtual std::string | getError (void) const throw () |
| Returning the last error message and itself is disallowed to throw a exception. | |
| virtual const char * | what (void) const throw () |
| Polymorphed what function from standard C++ exception class retunring the last error message and itself is disallowed to throw a exception. | |
| void | printStacktrace (void) const throw () |
| Printing out a stacktrace and itself is disallowed to throw a exception. | |
Definition at line 80 of file Exception.
| Exception::Exception | ( | std::string | msg | ) |
Constructor awaiting your error message as a std::string.
| msg | Error description |
Definition at line 3 of file Exception.cpp.
| Exception::Exception | ( | const char * | msg | ) |
Constructor specially for using standard exception handling like bad_alloc or similiar.
| *msg | Char pointer pointing to the error description |
Definition at line 8 of file Exception.cpp.
| Exception::~Exception | ( | ) | throw () [inline, virtual] |
| std::string Exception::getError | ( | void | ) | const throw () [virtual] |
| void Exception::printStacktrace | ( | void | ) | const throw () |
Printing out a stacktrace and itself is disallowed to throw a exception.
Definition at line 21 of file Exception.cpp.
00021 { 00022 Dl_info dlinfo; 00023 const char *symname; 00024 char *demangled; 00025 int status; 00026 00027 if(!_traced) { 00028 std::cerr << "Error: No stacktrace available" << std::endl; 00029 } else { 00030 for(int i = 0; i < (_traced - 1); i++) { 00031 if(!dladdr(_stacktrace[i], &dlinfo)) { 00032 continue; 00033 } 00034 symname = dlinfo.dli_sname; 00035 demangled = abi::__cxa_demangle(symname, NULL, 0, &status); 00036 if(status == 0 && demangled) { 00037 symname = demangled; 00038 } 00039 std::cerr << dlinfo.dli_fname << " -- " << symname << std::endl; 00040 if(demangled) { 00041 free(demangled); 00042 } 00043 } 00044 } 00045 }
| const char * Exception::what | ( | void | ) | const throw () [virtual] |
Polymorphed what function from standard C++ exception class retunring the last error message and itself is disallowed to throw a exception.
Definition at line 17 of file Exception.cpp.
1.5.8