Tag: cws_dev300_dba31c
User: fs      
Date: 2008-09-11 20:44:33+0000
Modified:
   dba/dbaccess/inc/IEnvironment.hxx
   dba/dbaccess/inc/singledoccontroller.hxx

Log:
 #i87222# re-factored the error-related methods to what is actually needed/used

File Changes:

Directory: /dba/dbaccess/inc/
=============================

File [changed]: IEnvironment.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/inc/IEnvironment.hxx?r1=1.3&r2=1.3.80.1
Delta lines:  +22 -14
---------------------
--- IEnvironment.hxx    2008-04-10 12:11:39+0000        1.3
+++ IEnvironment.hxx    2008-09-11 20:44:31+0000        1.3.80.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: IEnvironment.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.80.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -30,38 +30,46 @@
 #ifndef DBAUI_IENVIRONMENT_HXX
 #define DBAUI_IENVIRONMENT_HXX
 
-#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_
 #include <com/sun/star/sdbc/SQLException.hpp>
-#endif
+
+#include <connectivity/standardsqlstate.hxx>
+
+namespace dbtools
+{
+    class SQLExceptionInfo;
+}
 
 namespace dbaui
 {
        // interface class for a generell environment
        class IEnvironment
        {
-       protected:
        public:
                /** appends an error in the current environment.
-                       @param  _aException
-                               contains a description of the error or the 
error directly
                */
-               virtual void appendError(const 
::com::sun::star::sdbc::SQLException& _aException) = 0;
+        virtual void appendError(
+                        const ::rtl::OUString& _rErrorMessage,
+                        const ::dbtools::StandardSQLState _eSQLState = 
::dbtools::SQL_GENERAL_ERROR,
+                        const sal_Int32 _nErrorCode = 1000
+                     ) = 0;
 
                /** clears the error state.
                */
                virtual void clearError() = 0;
 
-               /** set the current error in the given parameter.
-                       @param  _rException
-                               will contain the current error
-               */
-               virtual void getError(::com::sun::star::sdbc::SQLException& 
_rException ) const = 0;
-
                /** @retrun
                        returns <TRUE/> when an error was set otherwise <FALSE/>
                */
                virtual sal_Bool hasError() const = 0;
 
+        /** returns the current error
+        */
+        virtual const ::dbtools::SQLExceptionInfo& getError() const = 0;
+
+        /** displays the current error, or does nothing if there is no current 
error
+        */
+        virtual void displayError() = 0;
+
                /** gives access to the currently used connection
                        @return
                                the currently used connection.

File [changed]: singledoccontroller.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/inc/singledoccontroller.hxx?r1=1.6&r2=1.6.80.1
Delta lines:  +15 -11
---------------------
--- singledoccontroller.hxx     2008-04-10 12:14:50+0000        1.6
+++ singledoccontroller.hxx     2008-09-11 20:44:31+0000        1.6.80.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: singledoccontroller.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.80.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -136,26 +136,30 @@
 
                // IEnvironment
                /** appends an error in the current environment.
-                       @param  _aException
-                               contains a description of the error or the 
error directly
                */
-               virtual void appendError(const 
::com::sun::star::sdbc::SQLException& _aException);
+        virtual void appendError(
+                        const ::rtl::OUString& _rErrorMessage,
+                        const ::dbtools::StandardSQLState _eSQLState = 
::dbtools::SQL_GENERAL_ERROR,
+                        const sal_Int32 _nErrorCode = 1000
+                     );
 
                /** clears the error state.
                */
                virtual void clearError();
 
-               /** set the current error in the given parameter.
-                       @param  _rException
-                               will contain the current error
-               */
-               virtual void getError(::com::sun::star::sdbc::SQLException& 
_rException ) const;
-
                /** @return
                            <TRUE/> when an error was set otherwise <FALSE/>
                */
                virtual sal_Bool hasError() const;
 
+        /** returns the current error
+        */
+        virtual const ::dbtools::SQLExceptionInfo& getError() const;
+
+        /** displays the current error, or does nothing if there is no current 
error
+        */
+        virtual void displayError();
+
                /** shows an info box with the string conntection lost.
                */
                void connectionLostMessage() const;




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

Reply via email to