From e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 May 2014 12:03:21 +0200 Subject: remove boilerplate in UNO Exception constructor calls Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74 --- cli_ure/source/climaker/climaker_app.cxx | 12 ++++-------- cli_ure/source/climaker/climaker_emit.cxx | 9 +++------ 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'cli_ure') diff --git a/cli_ure/source/climaker/climaker_app.cxx b/cli_ure/source/climaker/climaker_app.cxx index b47be9312774..0f14a170b028 100644 --- a/cli_ure/source/climaker/climaker_app.cxx +++ b/cli_ure/source/climaker/climaker_app.cxx @@ -240,15 +240,13 @@ static OUString path_make_absolute_file_url( OUString const & path ) else { throw RuntimeException( - "cannot make absolute: " + file_url, - css::uno::Reference< XInterface >() ); + "cannot make absolute: " + file_url ); } } else { throw RuntimeException( - "cannot get file url from system path: " + path, - css::uno::Reference< XInterface >() ); + "cannot get file url from system path: " + path ); } } @@ -381,8 +379,7 @@ SAL_IMPLEMENT_MAIN() buf.append( cmd_arg ); buf.append( "! Use climaker --help to print all options." ); throw RuntimeException( - buf.makeStringAndClear(), - css::uno::Reference< XInterface >() ); + buf.makeStringAndClear() ); } else { @@ -457,8 +454,7 @@ SAL_IMPLEMENT_MAIN() { throw RuntimeException( "cannot get system path from file url " + - output.copy( 0, slash ), - css::uno::Reference< XInterface >() ); + output.copy( 0, slash ) ); } OUString filename( output.copy( slash +1 ) ); sal_Int32 dot = filename.lastIndexOf( '.' ); diff --git a/cli_ure/source/climaker/climaker_emit.cxx b/cli_ure/source/climaker/climaker_emit.cxx index 58f3c1172c76..b3139d709c76 100644 --- a/cli_ure/source/climaker/climaker_emit.cxx +++ b/cli_ure/source/climaker/climaker_emit.cxx @@ -90,8 +90,7 @@ static inline ::System::Object ^ to_cli_constant( Any const & value ) default: throw RuntimeException( "unexpected constant type " + - value.getValueType().getTypeName(), - Reference< XInterface >() ); + value.getValueType().getTypeName() ); } } @@ -1265,8 +1264,7 @@ Assembly ^ TypeEmitter::type_resolve( else { throw RuntimeException( - "unexpected member type in " + entry->m_xType->getName(), - Reference< XInterface >() ); + "unexpected member type in " + entry->m_xType->getName() ); } } else @@ -2153,8 +2151,7 @@ Emit::CustomAttributeBuilder^ TypeEmitter::get_exception_attribute( return nullptr; default: throw RuntimeException( - "unexpected type " + xType->getName(), - Reference< XInterface >() ); + "unexpected type " + xType->getName() ); } } -- cgit