summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno_module.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-12-17 17:46:31 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-12-17 17:46:31 +0000
commit7129fcc90e2c0c0e582477e07ad5acea26f75798 (patch)
tree0ee86b51e29103b31822f153ea20a08d85829155 /pyuno/source/module/pyuno_module.cxx
parent896abc29b61fccfbf5418a02d73400132edd3a88 (diff)
INTEGRATION: CWS geordi2q11 (1.5.4); FILE MERGED
2003/12/16 14:04:29 hr 1.5.4.1: #111934#: join CWS ooo111fix1
Diffstat (limited to 'pyuno/source/module/pyuno_module.cxx')
-rw-r--r--pyuno/source/module/pyuno_module.cxx27
1 files changed, 20 insertions, 7 deletions
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index ecf647fc1bcb..b3a4448420eb 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pyuno_module.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2003-12-01 16:06:31 $
+ * last change: $Author: vg $ $Date: 2003-12-17 18:46:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -247,6 +247,16 @@ static OUString getLibDir()
return *pLibDir;
}
+static void raisePySystemException( const char * exceptionType, const OUString & message )
+{
+ OStringBuffer buf;
+ buf.append( "Error during bootstrapping uno (");
+ buf.append( exceptionType );
+ buf.append( "):" );
+ buf.append( OUStringToOString( message, osl_getThreadTextEncoding() ) );
+ PyErr_SetString( PyExc_SystemError, buf.makeStringAndClear().getStr() );
+}
+
static PyObject* getComponentContext (PyObject* self, PyObject* args)
{
PyRef ret;
@@ -291,23 +301,26 @@ static PyObject* getComponentContext (PyObject* self, PyObject* args)
}
catch (com::sun::star::registry::InvalidRegistryException &e)
{
- raisePyExceptionWithAny( makeAny(e) );
+ // can't use raisePyExceptionWithAny() here, because the function
+ // does any conversions, which will not work with a
+ // wrongly bootstrapped pyuno!
+ raisePySystemException( "InvalidRegistryException", e.Message );
}
catch( com::sun::star::lang::IllegalArgumentException & e)
{
- raisePyExceptionWithAny( makeAny(e));
+ raisePySystemException( "IllegalArgumentException", e.Message );
}
catch( com::sun::star::script::CannotConvertException & e)
{
- raisePyExceptionWithAny( makeAny(e));
+ raisePySystemException( "CannotConvertException", e.Message );
}
catch (com::sun::star::uno::RuntimeException & e)
{
- raisePyExceptionWithAny( makeAny(e) );
+ raisePySystemException( "RuntimeException", e.Message );
}
catch (com::sun::star::uno::Exception & e)
{
- raisePyExceptionWithAny( makeAny(e) );
+ raisePySystemException( "uno::Exception", e.Message );
}
return ret.getAcquired();
}