Index: pyuno_module.cxx =================================================================== RCS file: /cvs/udk/pyuno/source/module/pyuno_module.cxx,v retrieving revision 1.3.8.2 diff -c -r1.3.8.2 pyuno_module.cxx *** pyuno_module.cxx 8 Aug 2003 11:03:53 -0000 1.3.8.2 --- pyuno_module.cxx 13 Aug 2003 20:20:27 -0000 *************** *** 245,250 **** --- 245,260 ---- 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; *************** *** 289,311 **** } catch (com::sun::star::registry::InvalidRegistryException &e) { ! raisePyExceptionWithAny( makeAny(e) ); } catch( com::sun::star::lang::IllegalArgumentException & e) { ! raisePyExceptionWithAny( makeAny(e)); } catch( com::sun::star::script::CannotConvertException & e) { ! raisePyExceptionWithAny( makeAny(e)); } catch (com::sun::star::uno::RuntimeException & e) { ! raisePyExceptionWithAny( makeAny(e) ); } catch (com::sun::star::uno::Exception & e) { ! raisePyExceptionWithAny( makeAny(e) ); } return ret.getAcquired(); } --- 299,324 ---- } catch (com::sun::star::registry::InvalidRegistryException &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) { ! raisePySystemException( "IllegalArgumentException", e.Message ); } catch( com::sun::star::script::CannotConvertException & e) { ! raisePySystemException( "CannotConvertException", e.Message ); } catch (com::sun::star::uno::RuntimeException & e) { ! raisePySystemException( "RuntimeException", e.Message ); } catch (com::sun::star::uno::Exception & e) { ! raisePySystemException( "uno::Exception", e.Message ); } return ret.getAcquired(); }