Tag: mws_oof680 User: kz Date: 2007/01/24 05:28:38 Modified: dba/connectivity/source/drivers/dbase/DTable.cxx
Log: INTEGRATION: CWS calc41_OOF680 (1.100.28); FILE MERGED 2007/01/12 14:46:53 er 1.100.28.1: #i72457# UpdateBuffer: pass original error in exception File Changes: Directory: /dba/connectivity/source/drivers/dbase/ ================================================== File [changed]: DTable.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/dbase/DTable.cxx?r1=1.100&r2=1.100.14.1 Delta lines: +13 -9 -------------------- --- DTable.cxx 13 Dec 2006 16:16:24 -0000 1.100 +++ DTable.cxx 24 Jan 2007 13:28:35 -0000 1.100.14.1 @@ -109,6 +109,9 @@ #ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> #endif +#ifndef _CPPUHELPER_EXC_HLP_HXX_ +#include <cppuhelper/exc_hlp.hxx> +#endif #ifndef _CONNECTIVITY_SDBCX_COLUMN_HXX_ #include "connectivity/PColumn.hxx" #endif @@ -1563,7 +1566,8 @@ } sal_Bool bHadError = sal_False; - sal_Bool bCharacterConversionError = sal_False; + sal_Int32 nErrorCode = 1000; + ::rtl::OUString sSQLState = ::dbtools::getStandardSQLState( SQL_GENERAL_ERROR ); Any aSQLError; try { @@ -1660,7 +1664,13 @@ break; } } - catch( SQLException& e ) { aSQLError <<= e; bHadError = sal_True; bCharacterConversionError = ( e.ErrorCode == 22018 ); } + catch( SQLException& e ) + { + aSQLError = ::cppu::getCaughtException(); + bHadError = sal_True; + nErrorCode = e.ErrorCode; + sSQLState = e.SQLState; + } catch ( Exception& ) { bHadError = sal_True; } if ( bHadError ) @@ -1674,13 +1684,7 @@ sMsg += aColName; sMsg += ::rtl::OUString::createFromAscii("'"); - throw SQLException( - sMsg, - *this, - bCharacterConversionError ? ::rtl::OUString::createFromAscii( "22018" ) : ::dbtools::getStandardSQLState( SQL_GENERAL_ERROR ), - bCharacterConversionError ? 22018 : 1000, - aSQLError - ); + throw SQLException( sMsg, *this, sSQLState, nErrorCode, aSQLError ); } // Und weiter ... nByteOffset += nLen; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
