Kaydet (Commit) 96b29a2a authored tarafından Rüdiger Timm's avatar Rüdiger Timm

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
üst f0cf9acd
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: dbexception.cxx,v $ * $RCSfile: dbexception.cxx,v $
* *
* $Revision: 1.18 $ * $Revision: 1.19 $
* *
* last change: $Author: obo $ $Date: 2006-09-17 02:02:31 $ * last change: $Author: rt $ $Date: 2006-12-01 16:50:11 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -140,16 +140,25 @@ const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdb: ...@@ -140,16 +140,25 @@ const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::sdb:
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
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)); m_aContent = _rErrorEvent.Reason;
staruno::Type aReasonType = _rError.Reason.getValueType(); implDetermineType();
return *this;
}
sal_Bool bValid = isAssignableFrom(aSQLExceptionType, aReasonType); //------------------------------------------------------------------------------
OSL_ENSURE(bValid, "SQLExceptionInfo::SQLExceptionInfo : invalid argument (does not contain an SQLException) !"); const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::uno::Any& _rCaughtSQLException)
if (bValid) {
m_aContent = _rError.Reason; m_aContent = _rCaughtSQLException;
implDetermineType();
return *this;
}
//------------------------------------------------------------------------------
SQLExceptionInfo::SQLExceptionInfo(const ::com::sun::star::sdb::SQLErrorEvent& _rError)
{
m_aContent = _rError.Reason;
implDetermineType(); implDetermineType();
} }
...@@ -176,7 +185,10 @@ void SQLExceptionInfo::implDetermineType() ...@@ -176,7 +185,10 @@ void SQLExceptionInfo::implDetermineType()
else if (isA(aContentType, static_cast< ::com::sun::star::sdbc::SQLException*>(NULL))) else if (isA(aContentType, static_cast< ::com::sun::star::sdbc::SQLException*>(NULL)))
m_eType = SQL_EXCEPTION; m_eType = SQL_EXCEPTION;
else else
{
m_eType = UNDEFINED; m_eType = UNDEFINED;
m_aContent.clear();
}
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment