Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions include/SQLiteCpp/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 1 addition & 13 deletions src/Exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down