diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-01 12:24:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-02 07:48:21 +0000 |
commit | c0f9bdd3e644e3ebf690aff9eb1aeec4f16dbf27 (patch) | |
tree | e5bb6d31a17587452dde579803286f68ffc73672 /comphelper/source/property | |
parent | 52360bf8dd567598593cb212ac85f0c919315618 (diff) |
unnecessary use of OUStringBuffer in throwing exceptions
Change-Id: Iec1473264426f19c31e72260dfce9494389e474f
Reviewed-on: https://gerrit.libreoffice.org/33788
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper/source/property')
-rw-r--r-- | comphelper/source/property/propertycontainerhelper.cxx | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index 5e7fa4f00e16..adaa6557a860 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -200,16 +200,13 @@ namespace { void lcl_throwIllegalPropertyValueTypeException( const PropertyDescription& _rProperty, const Any& _rValue ) { - OUStringBuffer aErrorMessage; - aErrorMessage.append( "The given value cannot be converted to the required property type." ); - aErrorMessage.append( "\n(property name \"" ); - aErrorMessage.append( _rProperty.aProperty.Name ); - aErrorMessage.append( "\", found value type \"" ); - aErrorMessage.append( _rValue.getValueType().getTypeName() ); - aErrorMessage.append( "\", required property type \"" ); - aErrorMessage.append( _rProperty.aProperty.Type.getTypeName() ); - aErrorMessage.append( "\")" ); - throw IllegalArgumentException( aErrorMessage.makeStringAndClear(), nullptr, 4 ); + throw IllegalArgumentException( + "The given value cannot be converted to the required property type." + " (property name \"" + _rProperty.aProperty.Name + + "\", found value type \"" + _rValue.getValueType().getTypeName() + + "\", required property type \"" + _rProperty.aProperty.Type.getTypeName() + + "\")", + nullptr, 4 ); } } |