diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-23 23:10:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-23 23:11:02 +0100 |
commit | d689ad29c28ad7f077c2239a8fa4c2b6307a6aa1 (patch) | |
tree | d66cc700033fe101357b386f1e028101f64049ee /binaryurp | |
parent | 5645c15d3df900f65a1d9513155ee38743c543fa (diff) |
New o3tl::runtimeToOUString to convert from C++ runtime NTBS to OUString
Change-Id: I613bb70b6828f615fd45af38b2d873ece55ace60
Diffstat (limited to 'binaryurp')
-rw-r--r-- | binaryurp/source/incomingrequest.cxx | 7 | ||||
-rw-r--r-- | binaryurp/source/proxy.cxx | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/binaryurp/source/incomingrequest.cxx b/binaryurp/source/incomingrequest.cxx index cf66f9c7286d..a1c4ef39090f 100644 --- a/binaryurp/source/incomingrequest.cxx +++ b/binaryurp/source/incomingrequest.cxx @@ -25,6 +25,7 @@ #include "com/sun/star/bridge/XInstanceProvider.hpp" #include "cppuhelper/exc_hlp.hxx" +#include "o3tl/runtimetooustring.hxx" #include "rtl/byteseq.hxx" #include "rtl/ref.hxx" #include "rtl/ustring.hxx" @@ -77,10 +78,8 @@ void IncomingRequest::execute() const { isExc = !execute_throw(&ret, &outArgs); } catch (const std::exception & e) { throw css::uno::RuntimeException( - "caught C++ exception: " + - OStringToOUString( - OString(e.what()), RTL_TEXTENCODING_ASCII_US)); - // best-effort string conversion + "caught C++ exception: " + + o3tl::runtimeToOUString(e.what())); } } catch (const css::uno::RuntimeException &) { css::uno::Any exc(cppu::getCaughtException()); diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx index 5f23b4647208..1834968fa50b 100644 --- a/binaryurp/source/proxy.cxx +++ b/binaryurp/source/proxy.cxx @@ -24,6 +24,7 @@ #include <vector> #include "cppuhelper/exc_hlp.hxx" +#include "o3tl/runtimetooustring.hxx" #include "rtl/ref.hxx" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -100,10 +101,7 @@ void Proxy::do_dispatch( do_dispatch_throw(member, returnValue, arguments, exception); } catch (const std::exception & e) { throw css::uno::RuntimeException( - "caught C++ exception: " + - OStringToOUString( - OString(e.what()), RTL_TEXTENCODING_ASCII_US)); - // best-effort string conversion + "caught C++ exception: " + o3tl::runtimeToOUString(e.what())); } } catch (const css::uno::RuntimeException &) { css::uno::Any exc(cppu::getCaughtException()); |