diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-28 15:50:56 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-28 16:14:58 +0200 |
commit | 5bdc7103befd92313085824f51b5a8559f464e9a (patch) | |
tree | 32d0da00e07ce2f8d3f803fe9cf333448fd633d5 /xmloff | |
parent | 698315531414b223b35d8507fdf2f56dbcf6bc4c (diff) |
More details in debug output
In particular, give type and message of exception
when unexpectedly caught.
Also miscellaneous other details.
Change-Id: I87d71028dbc902e1770fee4c3643c85e75b7646d
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/forms/elementexport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/elementimport.cxx | 12 |
3 files changed, 20 insertions, 5 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 121b4d458ef1..bde6ccaca1c4 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -19,6 +19,7 @@ #include <string.h> +#include <tools/diagnose_ex.h> #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <tools/debug.hxx> #include <tools/urlobj.hxx> @@ -172,7 +173,8 @@ getBuildIdsProperty(uno::Reference<beans::XPropertySet> const& xImportInfo) } catch (Exception const& e) { - SAL_WARN("xmloff.core", "exception getting BuildId" << e.Message); + SAL_WARN("xmloff.core", "exception getting BuildId"); + DBG_UNHANDLED_EXCEPTION(); } } return OUString(); @@ -849,7 +851,8 @@ void SAL_CALL SvXMLImport::setTargetDocument( const uno::Reference< lang::XCompo } catch (uno::Exception const& e) { - SAL_WARN("xmloff.core", "exception caught: " << e.Message); + SAL_WARN("xmloff.core", "exception caught"); + DBG_UNHANDLED_EXCEPTION(); } if (!mxEventListener.is()) { @@ -1456,10 +1459,12 @@ void SvXMLImport::AddNumberStyle(sal_Int32 nKey, const OUString& rName) catch ( uno::Exception& ) { SAL_WARN( "xmloff.core", "Numberformat could not be inserted"); + DBG_UNHANDLED_EXCEPTION(); } } else { SAL_WARN( "xmloff.core", "not possible to create NameContainer"); + DBG_UNHANDLED_EXCEPTION(); } } diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index d4eeda78af6f..dbcb9c0e8e22 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -1862,6 +1862,7 @@ namespace xmloff catch( const Exception& ) { OSL_FAIL( "OControlExport::exportCellBindingAttributes: caught an exception!" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -1907,6 +1908,7 @@ namespace xmloff catch( const Exception& ) { OSL_FAIL( "OControlExport::exportCellListSourceRange: caught an exception!" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -1981,6 +1983,7 @@ namespace xmloff catch( const Exception& ) { OSL_FAIL( "OColumnExport::controlHasActiveDataBinding: caught an exception!" ); + DBG_UNHANDLED_EXCEPTION(); } return false; @@ -2012,6 +2015,7 @@ namespace xmloff catch( const Exception& ) { OSL_FAIL( "OControlExport::controlHasUserSuppliedListEntries: caught an exception!" ); + DBG_UNHANDLED_EXCEPTION(); } OSL_FAIL( "OControlExport::controlHasUserSuppliedListEntries: unreachable code!" ); diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 443209f25891..a75a8a0435f9 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -306,9 +306,10 @@ namespace xmloff xMultiProps->setPropertyValues(aNames, aValues); bSuccess = sal_True; } - catch(Exception&) + catch(const Exception&) { OSL_FAIL("OElementImport::implApplySpecificProperties: could not set the properties (using the XMultiPropertySet)!"); + DBG_UNHANDLED_EXCEPTION(); } } @@ -326,11 +327,12 @@ namespace xmloff { m_xElement->setPropertyValue(aPropValues->Name, aPropValues->Value); } - catch(Exception&) + catch(const Exception&) { OSL_FAIL(OStringBuffer("OElementImport::implApplySpecificProperties: could not set the property \""). append(OUStringToOString(aPropValues->Name, RTL_TEXTENCODING_ASCII_US)). append("\"!").getStr()); + DBG_UNHANDLED_EXCEPTION(); } } } @@ -468,11 +470,12 @@ namespace xmloff m_xElement->setPropertyValue( aPropValues->Name, aPropValues->Value ); } - catch(Exception&) + catch(const Exception&) { OSL_FAIL(OStringBuffer("OElementImport::EndElement: could not set the property \""). append(OUStringToOString(aPropValues->Name, RTL_TEXTENCODING_ASCII_US)). append("\"!").getStr()); + DBG_UNHANDLED_EXCEPTION(); } } } @@ -1031,6 +1034,7 @@ namespace xmloff catch( const Exception& ) { OSL_FAIL( "OControlImport::EndElement: caught an exception while retrieving the class id!" ); + DBG_UNHANDLED_EXCEPTION(); } const sal_Char* pValueProperty = NULL; @@ -1068,6 +1072,7 @@ namespace xmloff catch( const Exception& ) { OSL_FAIL( "OControlImport::EndElement: caught an exception while retrieving the current value property!" ); + DBG_UNHANDLED_EXCEPTION(); } } } @@ -1085,6 +1090,7 @@ namespace xmloff catch( const Exception& ) { OSL_FAIL( "OControlImport::EndElement: caught an exception while restoring the value property!" ); + DBG_UNHANDLED_EXCEPTION(); } } |