diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-23 12:03:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-23 15:06:00 +0200 |
commit | e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch) | |
tree | bc507bccee9fb71134e362b72d22991561e32aa0 /pyuno/source/module/pyuno_module.cxx | |
parent | c5d47c327a57df55fa3dac0fff6b65888d0345e4 (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 'pyuno/source/module/pyuno_module.cxx')
-rw-r--r-- | pyuno/source/module/pyuno_module.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 27986e54b1ac..6c55a5053ca0 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -96,7 +96,7 @@ public: , nPosConsumed (0) { if ( ! used ) - throw RuntimeException("pyuno._createUnoStructHelper failed to create new dictionary", Reference< XInterface > ()); + throw RuntimeException("pyuno._createUnoStructHelper failed to create new dictionary"); } ~fillStructState() { @@ -120,7 +120,7 @@ public: buf.append(pos); } buf.appendAscii( " initialised multiple times."); - throw RuntimeException(buf.makeStringAndClear(), Reference< XInterface > ()); + throw RuntimeException(buf.makeStringAndClear()); } initialised[key] = true; if ( pos >= 0 ) @@ -191,7 +191,7 @@ static void fillStruct( buf.appendAscii( "' of struct type '"); buf.append(pCompType->aBase.pTypeName); buf.appendAscii( "' not given a value."); - throw RuntimeException(buf.makeStringAndClear(), Reference< XInterface > ()); + throw RuntimeException(buf.makeStringAndClear()); } } } @@ -425,7 +425,7 @@ static PyObject *createUnoStructHelper( buf.append( state.getCntConsumed() ); buf.appendAscii( ", got " ); buf.append( (sal_Int32) PyTuple_Size(initializer) ); - throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface > ()); + throw RuntimeException( buf.makeStringAndClear()); } ret = PyRef( PyTuple_Pack(2, returnCandidate.get(), state.getUsed()), SAL_NO_ACQUIRE); } @@ -524,7 +524,7 @@ static PyObject *getConstantByName( OUStringBuffer buf; buf.appendAscii( "pyuno.getConstantByName: " ).append( typeName ); buf.appendAscii( "is not a constant" ); - throw RuntimeException(buf.makeStringAndClear(), Reference< XInterface > () ); + throw RuntimeException(buf.makeStringAndClear() ); } PyRef constant = runtime.any2PyObject( td->getConstantValue() ); ret = constant.getAcquired(); @@ -534,7 +534,7 @@ static PyObject *getConstantByName( { // to the python programmer, this is a runtime exception, // do not support tweakings with the type system - RuntimeException runExc( e.Message, Reference< XInterface > () ); + RuntimeException runExc( e.Message ); raisePyExceptionWithAny( makeAny( runExc ) ); } catch(const com::sun::star::script::CannotConvertException & e) @@ -674,7 +674,7 @@ static PyObject *systemPathToFileUrl( buf.append( (sal_Int32) e ); buf.appendAscii( ")" ); raisePyExceptionWithAny( - makeAny( RuntimeException( buf.makeStringAndClear(), Reference< XInterface > () ))); + makeAny( RuntimeException( buf.makeStringAndClear() ))); return NULL; } return ustring2PyUnicode( url ).getAcquired(); @@ -700,7 +700,7 @@ static PyObject * fileUrlToSystemPath( buf.append( (sal_Int32) e ); buf.appendAscii( ")" ); raisePyExceptionWithAny( - makeAny( RuntimeException( buf.makeStringAndClear(), Reference< XInterface > () ))); + makeAny( RuntimeException( buf.makeStringAndClear() ))); return NULL; } return ustring2PyUnicode( sysPath ).getAcquired(); |