summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpputools/source/unoexe/unoexe.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index ca9aaa85d171..bed17183dfd7 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -155,15 +155,7 @@ void createInstance(
throw RuntimeException( "cannot get service instance \"" + rServiceName + "\"!" );
}
- rxOut.set( x, UNO_QUERY );
- if (! rxOut.is())
- {
- const Type & rType = cppu::UnoType<T>::get();
- throw RuntimeException(
- "service instance \"" + rServiceName +
- "\" does not support demanded interface \"" +
- rType.getTypeName() + "\"!" );
- }
+ rxOut.set( x, UNO_QUERY_THROW );
}
/// @throws Exception
@@ -490,9 +482,7 @@ SAL_IMPLEMENT_MAIN()
if (bSingleAccept)
{
- Reference< XComponent > xComp( xBridge, UNO_QUERY );
- if (! xComp.is())
- throw RuntimeException( "bridge factory does not export interface \"com.sun.star.lang.XComponent\"!" );
+ Reference< XComponent > xComp( xBridge, UNO_QUERY_THROW );
ODisposingListener::waitFor( xComp );
xComp->dispose();
// explicitly dispose the remote bridge so that it joins