Skip to content

Commit

Permalink
Merge pull request joeferner#77 from raztus/catchCloseException
Browse files Browse the repository at this point in the history
Catch close exception
  • Loading branch information
joeferner committed Aug 29, 2013
2 parents 49be95f + 14d29bf commit f122616
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,13 @@ Handle<Value> Connection::SetAutoCommit(const Arguments& args) {

void Connection::closeConnection() {
if(m_environment && m_connection) {
m_environment->terminateConnection(m_connection);
m_connection = NULL;
try {
m_environment->terminateConnection(m_connection);
m_connection = NULL;
} catch (oracle::occi::SQLException &ex) {
m_connection = NULL;
throw; // rethrow to allow caller to catch and rethrow in V8 scope
}
}
}

Expand Down

0 comments on commit f122616

Please sign in to comment.