MCPcopy Create free account
hub / github.com/arrayfire/forge / FgError

Class FgError

src/backend/common/err_common.hpp:28–71  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Exception Classes Error, TypeError, ArgumentError ///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

26// Error, TypeError, ArgumentError
27////////////////////////////////////////////////////////////////////////////////
28class FgError : public std::logic_error
29{
30 std::string mFuncName;
31 std::string mFileName;
32 int mLineNumber;
33 forge::ErrorCode mErrCode;
34 FgError();
35
36public:
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
74class TypeError : public FgError

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected