User: ihi Date: 2007-11-21 14:58:46+0000 Modified: dba/connectivity/source/commontools/dbexception.cxx
Log: INTEGRATION: CWS dba24c (1.20.20); FILE MERGED 2007/09/18 20:05:13 fs 1.20.20.3: during #i81095#: outsourced the CYCLIC_SUB_QUERIES error to the new css.sdb.ErrorCondition 2007/09/18 12:52:08 fs 1.20.20.2: doThrow: there is a ::cppu::throwException, which is much better than our self-made solution 2007/09/13 11:43:57 fs 1.20.20.1: better grammar in throwFunctionNotSupportedException 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.20&r2=1.21 Delta lines: +9 -11 -------------------- --- dbexception.cxx 2007-07-24 11:49:40+0000 1.20 +++ dbexception.cxx 2007-11-21 14:58:44+0000 1.21 @@ -42,6 +42,9 @@ #ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> #endif +#ifndef _CPPUHELPER_EXC_HLP_HXX_ +#include <cppuhelper/exc_hlp.hxx> +#endif #ifndef _OSL_DIAGNOSE_H_ #include <osl/diagnose.h> #endif @@ -296,13 +299,9 @@ //------------------------------------------------------------------------------ void SQLExceptionInfo::doThrow() { - switch ( m_eType ) - { - case SQL_EXCEPTION: throw *(const SQLException*)(*this); - case SQL_WARNING: throw *(const SQLWarning*)(*this); - case SQL_CONTEXT: throw *(const SQLContext*)(*this); - default: throw RuntimeException(); - } + if ( m_aContent.getValueTypeClass() == TypeClass_EXCEPTION ) + ::cppu::throwException( m_aContent ); + throw RuntimeException(); } //============================================================================== @@ -455,7 +454,8 @@ 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: " ) ); + ::rtl::OUString sMessage = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The driver does not support this function: " ) ); + // TODO: resource sMessage += ::rtl::OUString::createFromAscii( _pAsciiFunctionName ); throw SQLException( sMessage, @@ -555,8 +555,6 @@ case SQL_FUNCTION_NOT_SUPPORTED: pAsciiState = "IM001"; break; case SQL_CONNECTION_DOES_NOT_EXIST: pAsciiState = "08003"; break; - // OOoBase-specific SQLStates - case SQL_CYCLIC_SUB_QUERIES: pAsciiState = "OB001"; break; default: break; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
