diff --git a/include/SQLiteCpp/Exception.h b/include/SQLiteCpp/Exception.h index 07f296b1..6fd92de9 100644 --- a/include/SQLiteCpp/Exception.h +++ b/include/SQLiteCpp/Exception.h @@ -76,10 +76,14 @@ class Exception : public std::runtime_error Exception(sqlite3* apSQLite, int ret); /// Return the result code (if any, otherwise -1). - int getErrorCode() const noexcept; // nothrow + int getErrorCode() const noexcept { // nothrow + return mErrcode; + } /// Return the extended numeric result code (if any, otherwise -1). - int getExtendedErrorCode() const noexcept; // nothrow + int getExtendedErrorCode() const noexcept { // nothrow + return mExtendedErrcode; + } /// Return a string, solely based on the error code const char* getErrorStr() const noexcept; // nothrow diff --git a/src/Exception.cpp b/src/Exception.cpp index 45bbe0d6..c2f03040 100644 --- a/src/Exception.cpp +++ b/src/Exception.cpp @@ -44,20 +44,8 @@ Exception::Exception(sqlite3* apSQLite, int ret) : { } -// Return the result code (if any, otherwise -1). -inline int Exception::getErrorCode() const noexcept // nothrow -{ - return mErrcode; -} - -// Return the extended numeric result code (if any, otherwise -1). -inline int Exception::getExtendedErrorCode() const noexcept // nothrow -{ - return mExtendedErrcode; -} - // Return a string, solely based on the error code -inline const char* Exception::getErrorStr() const noexcept // nothrow +const char* Exception::getErrorStr() const noexcept // nothrow { return sqlite3_errstr(mErrcode); }