From 7b01977c7a50ab5b16d894a0760d61bf04970766 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 18 Dec 2012 14:18:28 +0100 Subject: Improve error reporting Change-Id: I430344cfe70134fb18bd884056261b11924c71d0 --- cpputools/source/unoexe/unoexe.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'cpputools') diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index db3e63b8d36e..e6590a3fedfc 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -350,18 +350,20 @@ static Reference< XSimpleRegistry > openRegistry( if (xNewReg->isValid()) return xNewReg; else + { xNewReg->close(); + out( "\n> warning: cannot open registry " ); + out( rURL ); + } } - catch (Exception &) + catch (Exception & e) { + out( "\n> warning: cannot open registry " ); + out( rURL ); + out( ": " ); + out( e.Message ); } - out( "\n> warning: cannot open registry \"" ); - out( rURL ); - if (bReadOnly) - out( "\" for reading, ignoring!" ); - else - out( "\" for reading and writing, ignoring!" ); return Reference< XSimpleRegistry >(); } //-------------------------------------------------------------------------------------------------- -- cgit