Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed link errors calling Exception::getErrorCode() #96

Merged
merged 1 commit into from
Aug 5, 2016
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