00001
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "exception.h"
00024
00025 namespace faudes {
00026
00027 Exception::Exception(const std::string& rFunctionName,
00028 const std::string& rDescription, unsigned int errorId)
00029 : exception(), FunctionName(rFunctionName),
00030 Description(rDescription), ErrorId(errorId) {
00031 #ifdef FAUDES_DEBUG_EXCEPTIONS
00032 std::cerr << FunctionName << ": " << Description << std::endl;
00033 #endif
00034 }
00035
00036 Exception::~Exception() throw() { }
00037
00038 const char* Exception::Where() const throw() {
00039 return FunctionName.c_str();
00040 }
00041
00042 const char* Exception::What() const throw() {
00043 return Description.c_str();
00044 }
00045
00046 unsigned int Exception::Id() const throw() {
00047 return ErrorId;
00048 }
00049
00050 }