tdf#118022: fix crash when searching record in form by handling SQLException
See https://bugs.documentfoundation.org/attachment.cgi?id=142760 Found thanks on gdb with command catch throw com::sun:⭐:sdbc::SQLException First SQLException was dealt but not the second one Change-Id: I7d5d3ad612db132a3bda97cff14367912ae885f9 Reviewed-on: https://gerrit.libreoffice.org/55836 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
This commit is contained in:
committed by
Lionel Elie Mamane
parent
26867c39dc
commit
f94292e8c4
@@ -1150,10 +1150,22 @@ void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle&
|
||||
|
||||
OUString DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
|
||||
{
|
||||
if (!_rxField.is())
|
||||
return OUString();
|
||||
|
||||
const css::uno::Reference<css::beans::XPropertySet> xPS(_rxField, UNO_QUERY);
|
||||
FormattedColumnValue fmter( xFormatter, xPS );
|
||||
|
||||
return fmter.getFormattedValue();
|
||||
try
|
||||
{
|
||||
return fmter.getFormattedValue();
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
DBG_UNHANDLED_EXCEPTION("svx");
|
||||
}
|
||||
return OUString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user