summaryrefslogtreecommitdiff
path: root/comphelper/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-01 12:24:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-02 07:48:21 +0000
commitc0f9bdd3e644e3ebf690aff9eb1aeec4f16dbf27 (patch)
treee5bb6d31a17587452dde579803286f68ffc73672 /comphelper/qa
parent52360bf8dd567598593cb212ac85f0c919315618 (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/qa')
-rw-r--r--comphelper/qa/unit/variadictemplates.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/comphelper/qa/unit/variadictemplates.cxx b/comphelper/qa/unit/variadictemplates.cxx
index 77114df20fe2..2a3d0fef763f 100644
--- a/comphelper/qa/unit/variadictemplates.cxx
+++ b/comphelper/qa/unit/variadictemplates.cxx
@@ -44,14 +44,11 @@ inline void extract(
xErrorContext, static_cast<sal_Int16>(nArg) );
}
if (! fromAny(seq[nArg], &v)) {
- OUStringBuffer buf;
- buf.append( "Cannot extract ANY { " );
- buf.append( seq[nArg].getValueType().getTypeName() );
- buf.append( " } to " );
- buf.append( ::cppu::UnoType<T>::get().getTypeName() );
- buf.append( static_cast<sal_Unicode>('!') );
throw ::com::sun::star::lang::IllegalArgumentException(
- buf.makeStringAndClear(), xErrorContext,
+ "Cannot extract ANY { "
+ + seq[nArg].getValueType().getTypeName()
+ + " } to " + ::cppu::UnoType<T>::get().getTypeName(),
+ xErrorContext,
static_cast<sal_Int16>(nArg) );
}
}