summaryrefslogtreecommitdiff
path: root/cli_ure
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-23 12:03:21 +0200
committerNoel Grandin <noel@peralex.com>2014-05-23 15:06:00 +0200
commite7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch)
treebc507bccee9fb71134e362b72d22991561e32aa0 /cli_ure
parentc5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff)
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
Diffstat (limited to 'cli_ure')
-rw-r--r--cli_ure/source/climaker/climaker_app.cxx12
-rw-r--r--cli_ure/source/climaker/climaker_emit.cxx9
2 files changed, 7 insertions, 14 deletions
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() );
}
}