diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-19 17:54:47 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-19 18:03:17 +0100 |
commit | f486e4a428be124627d89ce9f9ccf18eca9deb75 (patch) | |
tree | 02c036690cd1178d9de4a33d848ab5ae1d0f6bf2 /pyuno | |
parent | 6fffabf4e5afcc97126b6281f3d322cbd7615f7d (diff) |
New loplugin:dynexcspec: Add @throws documentation, pyuno
Change-Id: I1888938e447f8ca115d326d5e4849d6b21904b04
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/inc/pyuno.hxx | 10 | ||||
-rw-r--r-- | pyuno/source/loader/pyuno_loader.cxx | 3 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_except.cxx | 2 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_impl.hxx | 8 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_module.cxx | 1 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 2 |
6 files changed, 24 insertions, 2 deletions
diff --git a/pyuno/inc/pyuno.hxx b/pyuno/inc/pyuno.hxx index bd1166683408..84e97646121a 100644 --- a/pyuno/inc/pyuno.hxx +++ b/pyuno/inc/pyuno.hxx @@ -215,6 +215,8 @@ public: throw ( css::uno::RuntimeException, std::exception ); /** Checks, whether the uno runtime is already initialized in the current python interpreter. + + @throws css::uno::RuntimeException */ static bool SAL_CALL isInitialized() throw (css::uno::RuntimeException); @@ -223,6 +225,10 @@ public: preconditions: python has been initialized before, the global interpreter lock is held and pyuno::Runtime has been initialized. + + @throws css::script::CannotConvertException + @throws css::lang::IllegalArgumentException + @throws css::uno::RuntimeException */ PyRef any2PyObject (const css::uno::Any &source ) const throw ( css::script::CannotConvertException, @@ -234,6 +240,8 @@ public: preconditions: python has been initialized before, the global interpreter lock is held and pyuno has been initialized + + @throws css::uno::RuntimeException */ css::uno::Any pyObject2Any ( const PyRef & source , enum ConversionMode mode = REJECT_UNO_ANY ) const @@ -313,6 +321,8 @@ public: precondition: The current thread MUST hold the global interpreter lock. postcondition: The current thread does not hold the global interpreter lock anymore. + + @throws css::uno::RuntimeException */ PyThreadDetach() throw ( css::uno::RuntimeException ); /** Acquires the global interpreter lock again diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx index af835411d115..f37e2c45fce3 100644 --- a/pyuno/source/loader/pyuno_loader.cxx +++ b/pyuno/source/loader/pyuno_loader.cxx @@ -63,6 +63,7 @@ using com::sun::star::uno::RuntimeException; namespace pyuno_loader { +/// @throws RuntimeException static void raiseRuntimeExceptionWhenNeeded() throw ( RuntimeException ) { if( PyErr_Occurred() ) @@ -79,6 +80,7 @@ static void raiseRuntimeExceptionWhenNeeded() throw ( RuntimeException ) } } +/// @throws RuntimeException static PyRef getLoaderModule() throw( RuntimeException ) { PyRef module( @@ -92,6 +94,7 @@ static PyRef getLoaderModule() throw( RuntimeException ) return PyRef( PyModule_GetDict( module.get() )); } +/// @throws RuntimeException static PyRef getObjectFromLoaderModule( const char * func ) throw ( RuntimeException ) { diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx index 1a42330f47ed..a0673696f00f 100644 --- a/pyuno/source/module/pyuno_except.cxx +++ b/pyuno/source/module/pyuno_except.cxx @@ -74,7 +74,7 @@ void raisePyExceptionWithAny( const css::uno::Any &anyExc ) } } - +/// @throws RuntimeException static PyRef createClass( const OUString & name, const Runtime &runtime ) throw ( RuntimeException ) { diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx index a688f306423d..f38c69aaceca 100644 --- a/pyuno/source/module/pyuno_impl.hxx +++ b/pyuno/source/module/pyuno_impl.hxx @@ -260,7 +260,8 @@ PyRef ustring2PyUnicode( const OUString &source ); PyRef ustring2PyString( const OUString & source ); OUString pyString2ustring( PyObject *str ); - +/// @throws css::reflection::InvocationTargetException +/// @throws css::uno::RuntimeException void raiseInvocationTargetExceptionWhenNeeded( const Runtime &runtime ) throw (css::reflection::InvocationTargetException, css::uno::RuntimeException); @@ -284,16 +285,20 @@ PyRef getClass( const OUString & name , const Runtime & runtime ); PyRef getAnyClass( const Runtime &); PyObject *PyUNO_invoke( PyObject *object, const char *name , PyObject *args ); +/// @throws css::uno::RuntimeException css::uno::Any PyEnum2Enum( PyObject *obj ) throw ( css::uno::RuntimeException ); +/// @throws css::uno::RuntimeException sal_Unicode PyChar2Unicode( PyObject *o ) throw ( css::uno::RuntimeException ); +/// @throws css::uno::RuntimeException css::uno::Type PyType2Type( PyObject * o ) throw( css::uno::RuntimeException ); void raisePyExceptionWithAny( const css::uno::Any &a ); const char *typeClassToString( css::uno::TypeClass t ); +/// @throws css::uno::RuntimeException PyRef getObjectFromUnoModule( const Runtime &runtime, const char * object ) throw ( css::uno::RuntimeException ); @@ -328,6 +333,7 @@ struct stRuntimeImpl public: static void del( PyObject *self ); + /// @throws css::uno::RuntimeException static PyRef create( const css::uno::Reference< css::uno::XComponentContext > & xContext ) throw ( css::uno::RuntimeException, std::exception ); diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 000b63dc688c..094c7f1ed848 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -137,6 +137,7 @@ public: } }; +/// @throws RuntimeException void fillStruct( const Reference< XInvocation2 > &inv, typelib_CompoundTypeDescription *pCompType, diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index c4b5aa9a018c..e77376f6aaac 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -128,6 +128,7 @@ static PyTypeObject RuntimeImpl_Type = /*---------------------------------------------------------------------- Runtime implementation -----------------------------------------------------------------------*/ +/// @throws css::uno::RuntimeException static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl ) throw ( css::uno::RuntimeException ) { @@ -153,6 +154,7 @@ static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl ) runtimeImpl = PyDict_GetItemString( globalDict.get() , "pyuno_runtime" ); } +/// @throws RuntimeException static PyRef importUnoModule( ) throw ( RuntimeException ) { // import the uno module |