diff options
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/errorcallback.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/xmlsecurity/source/xmlsec/errorcallback.cxx b/xmlsecurity/source/xmlsec/errorcallback.cxx index d1b25b6e6dbc..dc817db1e0bd 100644 --- a/xmlsecurity/source/xmlsec/errorcallback.cxx +++ b/xmlsecurity/source/xmlsec/errorcallback.cxx @@ -17,16 +17,15 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * Implementation of the I/O interfaces based on stream and URI binding - */ #include "errorcallback.hxx" #include "xmlsec-wrapper.h" -using namespace ::com::sun::star::xml::crypto; - +#ifdef _WIN32 +#include <prewin.h> +#include <postwin.h> +#include "comphelper/windowserrorstring.hxx" +#endif extern "C" void errorCallback(const char* file, @@ -40,7 +39,13 @@ void errorCallback(const char* file, const char* pErrorObject = errorObject ? errorObject : ""; const char* pErrorSubject = errorSubject ? errorSubject : ""; const char* pMsg = msg ? msg : ""; - SAL_WARN("xmlsecurity.xmlsec", file << ":" << line << ": " << func << "() '" << pErrorObject << "' '" << pErrorSubject << "' " << reason << " '" << pMsg << "'"); + OUString systemErrorString; + +#ifdef _WIN32 + systemErrorString = " " + WindowsErrorString(GetLastError()); +#endif + + SAL_WARN("xmlsecurity.xmlsec", file << ":" << line << ": " << func << "() '" << pErrorObject << "' '" << pErrorSubject << "' " << reason << " '" << pMsg << "'" << systemErrorString); } void setErrorRecorder() |