User: obo Date: 05/12/21 05:14:35 Modified: /dba/connectivity/source/commontools/ dbexception.cxx
Log: INTEGRATION: CWS dba202a (1.13.36); FILE MERGED 2005/11/24 14:58:06 fs 1.13.36.1: #126615# some more throwFooException File Changes: Directory: /dba/connectivity/source/commontools/ ================================================ File [changed]: dbexception.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/dbexception.cxx?r1=1.13&r2=1.14 Delta lines: +32 -1 -------------------- --- dbexception.cxx 8 Sep 2005 05:14:30 -0000 1.13 +++ dbexception.cxx 21 Dec 2005 13:14:32 -0000 1.14 @@ -376,6 +376,15 @@ throw SQLException(_rMsg,_Context,sStatus,0,_Next); } // ----------------------------------------------------------------------------- +void throwFunctionNotSupportedException( const sal_Char* _pAsciiFunctionName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext, + const ::com::sun::star::uno::Any* _pNextException ) throw ( ::com::sun::star::sdbc::SQLException ) +{ + ::rtl::OUString sMessage = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": Driver does not support this function: " ) ); + sMessage += ::rtl::OUString::createFromAscii( _pAsciiFunctionName ); + ::rtl::OUString sState( RTL_CONSTASCII_USTRINGPARAM( "IM001" ) ); + throw SQLException( sMessage, _rxContext, sState, 0, _pNextException ? *_pNextException : Any() ); +} +// ----------------------------------------------------------------------------- void throwGenericSQLException(const ::rtl::OUString& _rMsg, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxSource) throw (::com::sun::star::sdbc::SQLException) { @@ -388,6 +397,28 @@ { static ::rtl::OUString sStatus = ::rtl::OUString::createFromAscii("S1000"); throw SQLException(_rMsg, _rxSource, sStatus, 0, _rNextException); +} + +// ----------------------------------------------------------------------------- +void throwFeatureNotImplementedException( const sal_Char* _pAsciiFeatureName, const Reference< XInterface >& _rxContext, const Any* _pNextException ) + throw (SQLException) +{ + ::rtl::OUString sMessage = ::rtl::OUString::createFromAscii( _pAsciiFeatureName ) + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": feature not implemented." ) ); + ::rtl::OUString sState( RTL_CONSTASCII_USTRINGPARAM( "HYC00" ) ); + throw SQLException( sMessage, _rxContext, sState, 0, _pNextException ? *_pNextException : Any() ); +} + +// ----------------------------------------------------------------------------- +void throwSQLException( const sal_Char* _pAsciiMessage, const sal_Char* _pAsciiState, + const Reference< XInterface >& _rxContext, const sal_Int32 _nErrorCode, const Any* _pNextException ) throw (SQLException) +{ + throw SQLException( + ::rtl::OUString::createFromAscii( _pAsciiMessage ), + _rxContext, + ::rtl::OUString::createFromAscii( _pAsciiState ), + _nErrorCode, + _pNextException ? *_pNextException : Any() + ); } // ----------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
