Skip to content

Commit

Permalink
Merge pull request #96 from couchbasedeps/master
Browse files Browse the repository at this point in the history
Fixed link errors calling Exception::getErrorCode()
  • Loading branch information
SRombauts authored Aug 5, 2016
2 parents 9d1ea82 + 30e285f commit bfd8bb2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
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

0 comments on commit bfd8bb2

Please sign in to comment.