diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-07-23 13:07:49 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-07-23 13:07:49 +0000 |
commit | 67822dc6d0a2c751f55dfe753cc1c0073bfaa345 (patch) | |
tree | d7ff663b0d362c57af5ec242b67cee02871c97a2 /scripting/source/basprov | |
parent | db6a6d9a4d52b48d3258f7ab93f7c855280c70c0 (diff) |
INTEGRATION: CWS scriptingf7 (1.4.32); FILE MERGED
2004/07/09 18:11:57 npower 1.4.32.1: #i25260# Changed exception handling as per new exception specification for Xscript::inovke and XScriptProvider::getScript.
Diffstat (limited to 'scripting/source/basprov')
-rw-r--r-- | scripting/source/basprov/basscript.cxx | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx index 731bd1e87983..f945b7d75a0e 100644 --- a/scripting/source/basprov/basscript.cxx +++ b/scripting/source/basprov/basscript.cxx @@ -2,9 +2,9 @@ * * $RCSfile: basscript.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: toconnor $ $Date: 2003-10-29 15:00:49 $ + * last change: $Author: hr $ $Date: 2004-07-23 14:07:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,7 +75,9 @@ #ifndef _SB_SBMETH_HXX #include <basic/sbmeth.hxx> #endif - +#ifndef _DRAFTS_COM_SUN_STAR_SCRIPT_PROVIDER_SCRIPTFRAMEWORKERRORTYPE_HPP_ +#include <drafts/com/sun/star/script/provider/ScriptFrameworkErrorType.hpp> +#endif #include <map> @@ -100,8 +102,8 @@ namespace basprov // BasicScriptImpl // ============================================================================= - BasicScriptImpl::BasicScriptImpl( SbMethod* pMethod ) - :m_pMethod( pMethod ) + BasicScriptImpl::BasicScriptImpl( const ::rtl::OUString& funcName, SbMethod* pMethod ) + :m_pMethod( pMethod ), m_funcName( funcName ) { } @@ -116,7 +118,7 @@ namespace basprov // ----------------------------------------------------------------------------- Any BasicScriptImpl::invoke( const Sequence< Any >& aParams, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) - throw (IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) + throw ( provider::ScriptFrameworkErrorException, reflection::InvocationTargetException, uno::RuntimeException) { // TODO: throw CannotConvertException // TODO: check length of aOutParamIndex, aOutParam @@ -149,9 +151,15 @@ namespace basprov sal_Int32 nSbxCount = n - 1; if ( nParamsCount < nSbxCount - nSbxOptional ) { - throw IllegalArgumentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicScriptImpl::invoke: wrong number of paramters!" ) ), - Reference< XInterface >(), 1 ); + throw provider::ScriptFrameworkErrorException( + ::rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "wrong number of paramters!" ) ), + Reference< XInterface >(), + m_funcName, + ::rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "Basic" ) ), + provider::ScriptFrameworkErrorType::UNKNOWN ); } } |