Tag: cws_src680_dba23b
User: fs      
Date: 2007-07-08 19:36:55+0000
Modified:
   dba/connectivity/source/commontools/dbexception.cxx

Log:
 corrected implDetermineType to also recognize derived exception types

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.19&r2=1.19.66.1
Delta lines:  +11 -6
--------------------
--- dbexception.cxx     2006-12-01 16:50:11+0000        1.19
+++ dbexception.cxx     2007-07-08 19:36:50+0000        1.19.66.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbexception.cxx,v $
  *
- *  $Revision: 1.19 $
+ *  $Revision: 1.19.66.1 $
  *
- *  last change: $Author: rt $ $Date: 2006/12/01 16:50:11 $
+ *  last change: $Author: fs $ $Date: 2007/07/08 19:36:50 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -178,11 +178,16 @@
 void SQLExceptionInfo::implDetermineType()
 {
        staruno::Type aContentType = m_aContent.getValueType();
-       if (isA(aContentType, static_cast< 
::com::sun::star::sdb::SQLContext*>(NULL)))
+
+    const Type& aSQLExceptionType = ::getCppuType( reinterpret_cast< 
SQLException* >( NULL ) );
+       const Type& aSQLWarningType = ::getCppuType( reinterpret_cast< 
SQLWarning* >( NULL ) );
+       const Type& aSQLContextType  = ::getCppuType( reinterpret_cast< 
SQLContext* >( NULL ) );
+
+    if ( isAssignableFrom( aSQLContextType, m_aContent.getValueType() ) )
                m_eType = SQL_CONTEXT;
-       else if (isA(aContentType, static_cast< 
::com::sun::star::sdbc::SQLWarning*>(NULL)))
+       else if ( isAssignableFrom( aSQLWarningType, m_aContent.getValueType() 
) )
                m_eType = SQL_WARNING;
-       else if (isA(aContentType, static_cast< 
::com::sun::star::sdbc::SQLException*>(NULL)))
+       else if ( isAssignableFrom( aSQLExceptionType, 
m_aContent.getValueType() ) )
                m_eType = SQL_EXCEPTION;
        else
     {




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to