diff options
Diffstat (limited to 'cpp/src/qpid/store/ms-sql/Exception.h')
-rw-r--r-- | cpp/src/qpid/store/ms-sql/Exception.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/src/qpid/store/ms-sql/Exception.h b/cpp/src/qpid/store/ms-sql/Exception.h index 34e401b068..84b7f62739 100644 --- a/cpp/src/qpid/store/ms-sql/Exception.h +++ b/cpp/src/qpid/store/ms-sql/Exception.h @@ -46,8 +46,15 @@ public: ADOException(const std::string& _text, _com_error &e) : Exception(_text) { text += ": "; - _bstr_t wmsg = e.Description(); - text += (const char *)wmsg; + IErrorInfo *i = e.ErrorInfo(); + if (i != 0) { + _bstr_t wmsg = e.Description(); + text += (const char *)wmsg; + i->Release(); + } + else { + text += e.ErrorMessage(); + } } }; |