diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-30 17:32:50 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-10-01 18:17:11 +0200 |
commit | 20bae560c05a3df6e7ce8d4b869ed00f951c1e59 (patch) | |
tree | 968607d7c4f33c26302bee6731858c1ed64aa622 /reportdesign/source/core | |
parent | ebeff35a0305683574373b75c7b0e5797749fe3e (diff) |
throw more useful uno::Exception's
if we're going to throw the base class of the exception hierarchy,
we can at least put a useful message in there to make the source a little
bit easier to locate.
Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566
Reviewed-on: https://gerrit.libreoffice.org/42968
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'reportdesign/source/core')
-rw-r--r-- | reportdesign/source/core/sdr/RptModel.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx index 60cf31e4d2fe..6e9371015c5f 100644 --- a/reportdesign/source/core/sdr/RptModel.cxx +++ b/reportdesign/source/core/sdr/RptModel.cxx @@ -148,38 +148,38 @@ uno::Reference< uno::XInterface > OReportModel::createShape(const OUString& aSer uno::Reference<report::XFormattedField> xProp = new OFormattedField(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape); xRet = xProp; if ( _rShape.is() ) - throw uno::Exception(); + throw uno::Exception("no shape", nullptr); xProp->setPropertyValue( PROPERTY_FORMATSSUPPLIER, uno::makeAny(uno::Reference< util::XNumberFormatsSupplier >(*m_pReportDefinition,uno::UNO_QUERY)) ); } else if ( aServiceSpecifier == SERVICE_FIXEDTEXT) { xRet = static_cast<cppu::OWeakObject*>(new OFixedText(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape)); if ( _rShape.is() ) - throw uno::Exception(); + throw uno::Exception("no shape", nullptr); } else if ( aServiceSpecifier == SERVICE_FIXEDLINE) { xRet = static_cast<cppu::OWeakObject*>(new OFixedLine(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape,nOrientation)); if ( _rShape.is() ) - throw uno::Exception(); + throw uno::Exception("no shape", nullptr); } else if ( aServiceSpecifier == SERVICE_IMAGECONTROL ) { xRet = static_cast<cppu::OWeakObject*>(new OImageControl(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape)); if ( _rShape.is() ) - throw uno::Exception(); + throw uno::Exception("no shape", nullptr); } else if ( aServiceSpecifier == SERVICE_REPORTDEFINITION ) { xRet = static_cast<cppu::OWeakObject*>(new OReportDefinition(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape)); if ( _rShape.is() ) - throw uno::Exception(); + throw uno::Exception("no shape", nullptr); } else if ( _rShape.is() ) { xRet = static_cast<cppu::OWeakObject*>(new OShape(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape,aServiceSpecifier)); if ( _rShape.is() ) - throw uno::Exception(); + throw uno::Exception("no shape", nullptr); } } return xRet; |