Skip to content

Commit 86c2d02

Browse files
committed
postError() signature fix
1 parent df437ea commit 86c2d02

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

OdbcObject.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ void OdbcObject::clearErrors()
258258
}
259259

260260

261-
OdbcError* OdbcObject::postError(const char * sqlState, SQLException &exception)
261+
OdbcError* OdbcObject::postError(const char * sqlState, const SQLException &exception)
262262
{
263263
return postError( new OdbcError( exception.getSqlcode(), exception.getFbcode(), sqlState, exception.getText() ) );
264264
}
@@ -267,7 +267,7 @@ OdbcError* OdbcObject::postError(const char * sqlState, SQLException &exception)
267267
// site that catches SQLException first will dispatch the SQLException
268268
// overload above and only reach this one for non-SQLException objects, so
269269
// we can use what() directly without any runtime type check.
270-
OdbcError* OdbcObject::postError(const char * sqlState, std::exception &ex)
270+
OdbcError* OdbcObject::postError(const char * sqlState, const std::exception &ex)
271271
{
272272
return postError( new OdbcError( 0, 0, sqlState, ex.what() ) );
273273
}

OdbcObject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ class OdbcObject
5757
SQLRETURN sqlGetDiagRec (int handleType, int recNumber, SQLCHAR*sqlState,SQLINTEGER*nativeErrorPtr,SQLCHAR*messageText,int bufferLength,SQLSMALLINT*textLengthPtr);
5858
OdbcError* postError (const char *state, JString msg);
5959
const char * getString (char **temp, const UCHAR *string, int length, const char *defaultValue);
60-
OdbcError* postError (const char *sqlState, SQLException &exception);
61-
OdbcError* postError (const char *sqlState, std::exception &ex);
60+
OdbcError* postError (const char *sqlState, const SQLException &exception);
61+
OdbcError* postError (const char *sqlState, const std::exception &ex);
6262
void operator <<(OdbcObject * obj);
6363
void clearErrors();
6464
OdbcError* postError (OdbcError *error);

0 commit comments

Comments
 (0)