@@ -1026,12 +1026,12 @@ SQLRETURN OdbcConnection::sqlNativeSql( SQLCHAR * inStatementText, SQLINTEGER te
10261026 outText = (const char *)tempNative;
10271027
10281028 }
1029- catch (SQLException &ex)
1029+ catch (const SQLException &ex)
10301030 {
10311031 postError ( " HY000" , ex );
10321032 return SQL_ERROR ;
10331033 }
1034- catch (std::exception &ex)
1034+ catch (const std::exception &ex)
10351035 {
10361036 postError ( " HY000" , ex );
10371037 return SQL_ERROR ;
@@ -1136,14 +1136,14 @@ SQLRETURN OdbcConnection::sqlDisconnect()
11361136 connection = NULL ;
11371137 connected = false ;
11381138 }
1139- catch (SQLException &ex)
1139+ catch (const SQLException &ex)
11401140 {
11411141 postError (" 01002" , ex);
11421142 connection = NULL ;
11431143 connected = false ;
11441144 return SQL_SUCCESS_WITH_INFO ;
11451145 }
1146- catch (std::exception &ex)
1146+ catch (const std::exception &ex)
11471147 {
11481148 postError (" 01002" , ex);
11491149 connection = NULL ;
@@ -1734,12 +1734,12 @@ SQLRETURN OdbcConnection::connect(const char *sharedLibrary, const char * databa
17341734 WcsToMbs = connection->getConnectionWcsToMbs ();
17351735 MbsToWcs = connection->getConnectionMbsToWcs ();
17361736 }
1737- catch (SQLException &ex)
1737+ catch (const SQLException &ex)
17381738 {
17391739 rollbackPartialConnect ();
17401740 return sqlReturn ( SQL_ERROR , " 08004" , ex.getText (), ex.getSqlcode () );
17411741 }
1742- catch (std::exception &ex)
1742+ catch (const std::exception &ex)
17431743 {
17441744 rollbackPartialConnect ();
17451745 return sqlReturn ( SQL_ERROR , " 08004" , ex.what (), 0 );
@@ -1767,12 +1767,12 @@ SQLRETURN OdbcConnection::sqlEndTran(int operation)
17671767 connection->rollbackAuto ();
17681768 }
17691769 }
1770- catch (SQLException &ex)
1770+ catch (const SQLException &ex)
17711771 {
17721772 postError (" S1000" , ex);
17731773 return SQL_ERROR ;
17741774 }
1775- catch (std::exception &ex)
1775+ catch (const std::exception &ex)
17761776 {
17771777 postError (" S1000" , ex);
17781778 return SQL_ERROR ;
@@ -1789,12 +1789,12 @@ SQLRETURN OdbcConnection::sqlExecuteCreateDatabase(const char * sqlString)
17891789 {
17901790 connection->sqlExecuteCreateDatabase ( sqlString );
17911791 }
1792- catch (SQLException &ex)
1792+ catch (const SQLException &ex)
17931793 {
17941794 postError ( " HY000" , ex );
17951795 return SQL_ERROR ;
17961796 }
1797- catch (std::exception &ex)
1797+ catch (const std::exception &ex)
17981798 {
17991799 postError ( " HY000" , ex );
18001800 return SQL_ERROR ;
@@ -2207,11 +2207,11 @@ void OdbcConnection::initUserEvents( PODBC_EVENTS_BLOCK_INFO infoEvents )
22072207 userEventsInterfase->events = infoEvents->events ;
22082208 userEventsInterfase->count = infoEvents->count ;
22092209 }
2210- catch (SQLException &ex)
2210+ catch (const SQLException &ex)
22112211 {
22122212 postError ( " HY000" , ex );
22132213 }
2214- catch (std::exception &ex)
2214+ catch (const std::exception &ex)
22152215 {
22162216 postError ( " HY000" , ex );
22172217 }
@@ -2231,11 +2231,11 @@ void OdbcConnection::updateResultEvents( char *updated )
22312231 nextNameEvent->changed = userEvents->isChanged ( i );
22322232 }
22332233 }
2234- catch (SQLException &ex)
2234+ catch (const SQLException &ex)
22352235 {
22362236 postError ( " HY000" , ex );
22372237 }
2238- catch (std::exception &ex)
2238+ catch (const std::exception &ex)
22392239 {
22402240 postError ( " HY000" , ex );
22412241 }
@@ -2247,11 +2247,11 @@ void OdbcConnection::requeueEvents()
22472247 {
22482248 userEvents->queEvents ( userEventsInterfase );
22492249 }
2250- catch (SQLException &ex)
2250+ catch (const SQLException &ex)
22512251 {
22522252 postError ( " HY000" , ex );
22532253 }
2254- catch (std::exception &ex)
2254+ catch (const std::exception &ex)
22552255 {
22562256 postError ( " HY000" , ex );
22572257 }
0 commit comments