summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno_except.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-20 13:55:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-21 06:05:38 +0000
commit657f067b917169f41a8432c8f329877f6e50c3f6 (patch)
tree029c5ade03fecbe0b6cee67680bd2904f2964be8 /pyuno/source/module/pyuno_except.cxx
parent778d6ddc24e927260d1002e23cf0bbcc4a0ed74c (diff)
remove some unnecessary OUStringBuffer usage
Change-Id: Iae9146a3be569107019d9c5af404b94e51e76cd5 Reviewed-on: https://gerrit.libreoffice.org/34469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'pyuno/source/module/pyuno_except.cxx')
-rw-r--r--pyuno/source/module/pyuno_except.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx
index 643f3aaacd7c..074fd7d1cebd 100644
--- a/pyuno/source/module/pyuno_except.cxx
+++ b/pyuno/source/module/pyuno_except.cxx
@@ -82,10 +82,7 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
TypeDescription desc( name );
if( ! desc.is() )
{
- OUStringBuffer buf;
- buf.append( "pyuno.getClass: uno exception " );
- buf.append(name).append( " is unknown" );
- throw RuntimeException( buf.makeStringAndClear() );
+ throw RuntimeException( "pyuno.getClass: uno exception " + name + " is unknown" );
}
bool isStruct = desc.get()->eTypeClass == typelib_TypeClass_STRUCT;
@@ -93,12 +90,9 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
bool isInterface = desc.get()->eTypeClass == typelib_TypeClass_INTERFACE;
if( !isStruct && !isExc && ! isInterface )
{
- OUStringBuffer buf;
- buf.append( "pyuno.getClass: " ).append(name).append( "is a " );
- buf.appendAscii(
- typeClassToString( (css::uno::TypeClass) desc.get()->eTypeClass));
- buf.append( ", expected EXCEPTION, STRUCT or INTERFACE" );
- throw RuntimeException( buf.makeStringAndClear() );
+ throw RuntimeException( "pyuno.getClass: " + name + "is a " +
+ OUString::createFromAscii( typeClassToString( (css::uno::TypeClass) desc.get()->eTypeClass) ) +
+ ", expected EXCEPTION, STRUCT or INTERFACE" );
}
// retrieve base class