summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno_except.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno/source/module/pyuno_except.cxx')
-rw-r--r--pyuno/source/module/pyuno_except.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx
index 8b712400adf3..7cd879f0e81e 100644
--- a/pyuno/source/module/pyuno_except.cxx
+++ b/pyuno/source/module/pyuno_except.cxx
@@ -47,15 +47,11 @@ void raisePyExceptionWithAny( const css::uno::Any &anyExc )
css::uno::Exception e;
anyExc >>= e;
- OUStringBuffer buf;
- buf.append( "Couldn't convert uno exception to a python exception (" );
- buf.append(anyExc.getValueType().getTypeName());
- buf.append( ": " );
- buf.append(e.Message );
- buf.append( ")" );
+ OUString buf = "Couldn't convert uno exception to a python exception (" +
+ anyExc.getValueType().getTypeName() + ": " + e.Message + ")";
PyErr_SetString(
PyExc_SystemError,
- OUStringToOString(buf.makeStringAndClear(),RTL_TEXTENCODING_ASCII_US).getStr() );
+ OUStringToOString(buf,RTL_TEXTENCODING_ASCII_US).getStr() );
}
}
catch(const css::lang::IllegalArgumentException & e)