User: rt Date: 2006/12/01 08:50:14 Modified: dba/connectivity/source/commontools/dbexception.cxx
Log: INTEGRATION: CWS dba22a (1.18.18); FILE MERGED 2006/11/27 10:57:30 fs 1.18.18.2: implDetermineType: don't assert 2006/11/22 20:45:53 fs 1.18.18.1: #i71860# assignment from SQLErrorEvent and Any 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.18&r2=1.19 Delta lines: +19 -7 -------------------- --- dbexception.cxx 17 Sep 2006 02:02:31 -0000 1.18 +++ dbexception.cxx 1 Dec 2006 16:50:11 -0000 1.19 @@ -140,16 +140,25 @@ } //------------------------------------------------------------------------------ -SQLExceptionInfo::SQLExceptionInfo(const ::com::sun::star::sdb::SQLErrorEvent& _rError) +const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdb::SQLErrorEvent& _rErrorEvent) { - const staruno::Type& aSQLExceptionType = ::getCppuType(reinterpret_cast< ::com::sun::star::sdbc::SQLException*>(NULL)); - staruno::Type aReasonType = _rError.Reason.getValueType(); + m_aContent = _rErrorEvent.Reason; + implDetermineType(); + return *this; +} - sal_Bool bValid = isAssignableFrom(aSQLExceptionType, aReasonType); - OSL_ENSURE(bValid, "SQLExceptionInfo::SQLExceptionInfo : invalid argument (does not contain an SQLException) !"); - if (bValid) - m_aContent = _rError.Reason; +//------------------------------------------------------------------------------ +const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::uno::Any& _rCaughtSQLException) +{ + m_aContent = _rCaughtSQLException; + implDetermineType(); + return *this; +} +//------------------------------------------------------------------------------ +SQLExceptionInfo::SQLExceptionInfo(const ::com::sun::star::sdb::SQLErrorEvent& _rError) +{ + m_aContent = _rError.Reason; implDetermineType(); } @@ -176,7 +185,10 @@ else if (isA(aContentType, static_cast< ::com::sun::star::sdbc::SQLException*>(NULL))) m_eType = SQL_EXCEPTION; else + { m_eType = UNDEFINED; + m_aContent.clear(); + } } //------------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
