use more TOOLS_WARN_EXCEPTION
so we get more complete information when something goes wrong Change-Id: Ia73623f748b0779cf80b0086bd8258791590e9ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include <ucbhelper/content.hxx>
|
||||
|
||||
#include <comphelper/bytereader.hxx>
|
||||
#include <comphelper/diagnose_ex.hxx>
|
||||
#include <comphelper/fileformat.h>
|
||||
#include <comphelper/hash.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
@@ -388,7 +389,7 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData(
|
||||
}
|
||||
catch ( uno::Exception& )
|
||||
{
|
||||
OSL_ENSURE( false, "Can not create SHA256 digest!" );
|
||||
TOOLS_WARN_EXCEPTION("comphelper", "Can not create SHA256 digest!" );
|
||||
}
|
||||
|
||||
// MS_1252 encoding was used for SO60 document format password encoding,
|
||||
|
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <com/sun/star/container/ElementExistException.hpp>
|
||||
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
|
||||
#include <comphelper/diagnose_ex.hxx>
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
#include <o3tl/safeint.hxx>
|
||||
#include <utility>
|
||||
@@ -392,13 +393,13 @@ void Container::fire( const EventBroadcastHelper &helper )
|
||||
}
|
||||
catch ( css::uno::RuntimeException & )
|
||||
{
|
||||
OSL_ENSURE( false, "exception caught" );
|
||||
TOOLS_WARN_EXCEPTION( "connectivity.postgresql", "exception caught" );
|
||||
// loose coupling, a runtime exception shall not break anything
|
||||
// TODO: log away as warning !
|
||||
}
|
||||
catch( css::uno::Exception & )
|
||||
{
|
||||
OSL_ENSURE( false, "exception from listener flying through" );
|
||||
TOOLS_WARN_EXCEPTION( "connectivity.postgresql", "exception from listener flying through" );
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@
|
||||
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
|
||||
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
|
||||
#include <com/sun/star/chart2/XChartDocument.hpp>
|
||||
#include <comphelper/diagnose_ex.hxx>
|
||||
|
||||
using namespace com::sun::star;
|
||||
|
||||
@@ -468,7 +469,7 @@ void ScDrawView::SetMarkedOriginalSize()
|
||||
bDo = true;
|
||||
} catch( embed::NoVisualAreaSizeException& )
|
||||
{
|
||||
OSL_ENSURE( false, "Can't get the original size of the object!" );
|
||||
TOOLS_WARN_EXCEPTION("sc.ui", "Can't get the original size of the object!" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <com/sun/star/graphic/Primitive2DTools.hpp>
|
||||
#include <com/sun/star/uno/Reference.h>
|
||||
#include <unotools/configmgr.hxx>
|
||||
#include <comphelper/diagnose_ex.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
#include <rtl/bootstrap.hxx>
|
||||
@@ -194,7 +195,7 @@ bool SfxApplication::loadBrandSvg(const char *pName, BitmapEx &rBitmap, int nWid
|
||||
}
|
||||
catch(const uno::Exception&)
|
||||
{
|
||||
OSL_ENSURE(false, "Got no graphic::XPrimitive2DRenderer (!)" );
|
||||
TOOLS_WARN_EXCEPTION("sfx.appl", "Got no graphic::XPrimitive2DRenderer (!)" );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
|
||||
#include <com/sun/star/frame/ModuleManager.hpp>
|
||||
#include <osl/diagnose.h>
|
||||
#include <comphelper/diagnose_ex.hxx>
|
||||
#include <comphelper/lok.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <sfx2/lokhelper.hxx>
|
||||
@@ -116,7 +117,7 @@ OUString ContextChangeBroadcaster::GetModuleName (const css::uno::Reference<css:
|
||||
}
|
||||
catch (const Exception&)
|
||||
{
|
||||
OSL_ENSURE(false, "can not determine module name");
|
||||
TOOLS_WARN_EXCEPTION("sfx.sidebar", "can not determine module name");
|
||||
}
|
||||
return OUString();
|
||||
}
|
||||
|
@@ -91,7 +91,7 @@ drawinglayer::primitive2d::Primitive2DContainer ChartHelper::tryToGetChartConten
|
||||
}
|
||||
catch(uno::Exception&)
|
||||
{
|
||||
OSL_ENSURE(false, "Unexpected exception!");
|
||||
TOOLS_WARN_EXCEPTION("svx", "");
|
||||
}
|
||||
|
||||
if(!aRetval.empty())
|
||||
|
@@ -292,7 +292,7 @@ void UnoControlDialogModel::setFastPropertyValue_NoBroadcast( std::unique_lock<s
|
||||
}
|
||||
catch( const css::uno::Exception& )
|
||||
{
|
||||
OSL_ENSURE( false, "UnoControlDialogModel::setFastPropertyValue_NoBroadcast: caught an exception while setting ImageURL properties!" );
|
||||
TOOLS_WARN_EXCEPTION( "toolkit", "caught an exception while setting ImageURL properties" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#include <utility>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <vcl/outdev.hxx>
|
||||
#include <comphelper/diagnose_ex.hxx>
|
||||
#include <comphelper/string.hxx>
|
||||
#include <comphelper/sequence.hxx>
|
||||
#include <xmloff/odffields.hxx>
|
||||
@@ -388,7 +389,8 @@ void SdtHelper::createDateContentControl()
|
||||
}
|
||||
catch (uno::Exception&)
|
||||
{
|
||||
OSL_ENSURE(false, "Cannot get the right text range for date field");
|
||||
TOOLS_WARN_EXCEPTION("writerfilter.dmapper",
|
||||
"Cannot get the right text range for date field");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include <com/sun/star/beans/TolerantPropertySetResultType.hpp>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <comphelper/anycompare.hxx>
|
||||
#include <comphelper/diagnose_ex.hxx>
|
||||
#include <cppuhelper/weakref.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
#include <list>
|
||||
@@ -438,7 +439,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
|
||||
catch( UnknownPropertyException& )
|
||||
{
|
||||
// might be a problem of getImplementationId
|
||||
OSL_ENSURE( false, "unknown property in getPropertyValue" );
|
||||
TOOLS_WARN_EXCEPTION("xmloff.style", "unknown property in getPropertyValue" );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -644,7 +645,7 @@ std::vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_(
|
||||
catch( UnknownPropertyException& )
|
||||
{
|
||||
// might be a problem of getImplementationId
|
||||
OSL_ENSURE( false, "unknown property in getPropertyStates" );
|
||||
TOOLS_WARN_EXCEPTION("xmloff.style", "unknown property in getPropertyStates" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include <com/sun/star/rdf/XMetadatable.hpp>
|
||||
|
||||
#include <com/sun/star/text/XFormField.hpp>
|
||||
#include <comphelper/diagnose_ex.hxx>
|
||||
|
||||
#include <RDFaImportHelper.hxx>
|
||||
|
||||
@@ -384,7 +385,7 @@ void XMLTextMarkImportContext::endFastElement(sal_Int32 nElement)
|
||||
try {
|
||||
xInsertionCursor->gotoRange(xStartRange, true);
|
||||
} catch (uno::Exception&) {
|
||||
OSL_ENSURE(false,
|
||||
TOOLS_WARN_EXCEPTION("xmloff.text",
|
||||
"cannot go to end position of bookmark");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user