From cdb05e22d1173f3e0232b237e811dc183a36fd07 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 25 Oct 2012 17:45:02 +0200 Subject: Improve error message Change-Id: Icdbb60525f858a2a0002a5e6f599eb6a6954a9dd --- desktop/source/deployment/manager/dp_manager.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'desktop/source/deployment') diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 894999efe105..bedc5013933c 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -436,15 +436,12 @@ Reference PackageManagerImpl::create( catch (const RuntimeException &) { throw; } - catch (const Exception &) { + catch (const Exception & e) { Any exc( ::cppu::getCaughtException() ); - ::rtl::OUStringBuffer buf; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[context=\"") ); - buf.append( context ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( - "\"] caught unexpected exception!") ); throw lang::WrappedTargetRuntimeException( - buf.makeStringAndClear(), Reference(), exc ); + ("[context=\"" + context + "\"] caught unexpected " + + exc.getValueType().getTypeName() + ": " + e.Message), + Reference(), exc ); } } -- cgit