/////////////////////////////////////////////////////////////////////////// Exception Classes Error, TypeError, ArgumentError ///////////////////////////////////////////////////////////////////////////
| 26 | // Error, TypeError, ArgumentError |
| 27 | //////////////////////////////////////////////////////////////////////////////// |
| 28 | class FgError : public std::logic_error |
| 29 | { |
| 30 | std::string mFuncName; |
| 31 | std::string mFileName; |
| 32 | int mLineNumber; |
| 33 | forge::ErrorCode mErrCode; |
| 34 | FgError(); |
| 35 | |
| 36 | public: |
| 37 | |
| 38 | FgError(const char * const pFuncName, |
| 39 | const char * const pFileName, |
| 40 | const int pLineNumber, |
| 41 | const char * const pMessage, forge::ErrorCode pErrCode); |
| 42 | |
| 43 | FgError(std::string pFuncName, |
| 44 | std::string pFileName, |
| 45 | const int pLineNumber, |
| 46 | std::string pMessage, forge::ErrorCode pErrCode); |
| 47 | |
| 48 | const std::string& |
| 49 | getFunctionName() const |
| 50 | { |
| 51 | return mFuncName; |
| 52 | } |
| 53 | |
| 54 | const std::string& |
| 55 | getFileName() const |
| 56 | { |
| 57 | return mFileName; |
| 58 | } |
| 59 | |
| 60 | int getLineNumber() const |
| 61 | { |
| 62 | return mLineNumber; |
| 63 | } |
| 64 | |
| 65 | forge::ErrorCode getError() const |
| 66 | { |
| 67 | return mErrCode; |
| 68 | } |
| 69 | |
| 70 | virtual ~FgError() throw(); |
| 71 | }; |
| 72 | |
| 73 | // TODO: Perhaps add a way to return supported types |
| 74 | class TypeError : public FgError |
nothing calls this directly
no outgoing calls
no test coverage detected