diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-26 20:50:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-26 21:25:15 +0100 |
commit | 28b98516e53d1c6107b40eb994d25641195718e1 (patch) | |
tree | 87371a47adfa83e667c32b71b59d73931b30536e /connectivity | |
parent | bc9e82317a534d9da56a6de83479fc8f7ff2428e (diff) |
coverity#1079093 Uncaught exception
Change-Id: I4b09963e2daf22dcd006fee0ce0bb130c7c18342
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/Util.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx index 9a138570cd1d..448fa3ab2f43 100644 --- a/connectivity/source/drivers/firebird/Util.cxx +++ b/connectivity/source/drivers/firebird/Util.cxx @@ -8,7 +8,6 @@ */ #include "Util.hxx" - #include <rtl/ustrbuf.hxx> using namespace ::connectivity; @@ -39,11 +38,18 @@ void firebird::evaluateStatusVector(ISC_STATUS_ARRAY& aStatusVector, const ISC_STATUS* pStatus = (const ISC_STATUS*) &aStatusVector; buf.appendAscii("firebird_sdbc error:"); - while(fb_interpret(msg, sizeof(msg), &pStatus)) + try + { + while(fb_interpret(msg, sizeof(msg), &pStatus)) + { + // TODO: verify encoding + buf.appendAscii("\n*"); + buf.append(OUString(msg, strlen(msg), RTL_TEXTENCODING_UTF8)); + } + } + catch (...) { - // TODO: verify encoding - buf.appendAscii("\n*"); - buf.append(OUString(msg, strlen(msg), RTL_TEXTENCODING_UTF8)); + SAL_WARN("connectivity.firebird", "ignore fb_interpret exception"); } buf.appendAscii("\ncaused by\n'").append(aCause).appendAscii("'\n"); |