Tag: cws_src680_warnings01
User: sb      
Date: 06/04/07 13:13:41

Modified:
 /dba/connectivity/inc/connectivity/
  dbexception.hxx

Log:
 RESYNC: (1.13-1.14); FILE MERGED

File Changes:

Directory: /dba/connectivity/inc/connectivity/
==============================================

File [changed]: dbexception.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/inc/connectivity/dbexception.hxx?r1=1.12.30.2&r2=1.12.30.3
Delta lines:  +91 -17
---------------------
--- dbexception.hxx     16 Nov 2005 12:58:40 -0000      1.12.30.2
+++ dbexception.hxx     7 Apr 2006 20:13:39 -0000       1.12.30.3
@@ -143,11 +143,60 @@
 //=    StandardExceptions
 
//==================================================================================
 
//----------------------------------------------------------------------------------
+/** standard SQLStates to be used with an SQLException
+
+    Extend this list whenever you need a new state ...
+
+    @see 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_error_codes.asp
+*/
+enum StandardSQLState
+{
+    SQL_WRONG_PARAMETER_NUMBER,     // 07001
+    SQL_INVALID_DESCRIPTOR_INDEX,   // 07009
+    SQL_UNABLE_TO_CONNECT,          // 08001
+    SQL_NUMERIC_OUT_OF_RANGE,       // 22003
+    SQL_INVALID_DATE_TIME,          // 22007
+    SQL_INVALID_CURSOR_STATE,       // 24000
+    SQL_TABLE_OR_VIEW_EXISTS,       // 42S01
+    SQL_TABLE_OR_VIEW_NOT_FOUND,    // 42S02
+    SQL_INDEX_ESISTS,               // 42S11
+    SQL_INDEX_NOT_FOUND,            // 42S12
+    SQL_COLUMN_EXISTS,              // 42S21
+    SQL_COLUMN_NOT_FOUND,           // 42S22
+    SQL_GENERAL_ERROR,              // HY000
+    SQL_OPERATION_CANCELED,         // HY008
+    SQL_FUNCTION_SEQUENCE_ERROR,    // HY010
+    SQL_INVALID_CURSOR_POSITION,    // HY109
+    SQL_INVALID_BOOKMARK_VALUE,     // HY111
+    SQL_FEATURE_NOT_IMPLEMENTED,    // HYC00
+    SQL_FUNCTION_NOT_SUPPORTED      // IM001
+};
+
+//----------------------------------------------------------------------------------
+/** returns a standard error string for a given SQLState
+
+    @raises RuntimeException
+        in case of an internal error
+*/
+::rtl::OUString getStandardSQLState( StandardSQLState _eState );
+
+//----------------------------------------------------------------------------------
+/** returns a standard ASCII string for a given SQLState
+
+    @return
+        a non-<NULL/> pointer to an ASCII character string denoting the 
requested SQLState
+    @raises RuntimeException
+        in case of an internal error
+*/
+const sal_Char* getStandardSQLStateAscii( StandardSQLState _eState );
+
+//----------------------------------------------------------------------------------
 void throwFunctionNotSupportedException(
                const ::rtl::OUString& _rMsg,
         const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& _Context,
         const ::com::sun::star::uno::Any& _Next = ::com::sun::star::uno::Any()
-       )       throw ( ::com::sun::star::sdbc::SQLException );
+       )
+    throw ( ::com::sun::star::sdbc::SQLException );
 
 
//----------------------------------------------------------------------------------
 /** throws an exception with SQL state IM001, saying that a certain function 
is not supported
@@ -156,22 +205,34 @@
         const sal_Char* _pAsciiFunctionName,
         const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& _rxContext,
         const ::com::sun::star::uno::Any* _pNextException = NULL
-       )       throw ( ::com::sun::star::sdbc::SQLException );
+       )
+    throw ( ::com::sun::star::sdbc::SQLException );
+
 
//----------------------------------------------------------------------------------
-/** throw a function sequence exception
+/** throws a function sequence (HY010) exception
 */
-void throwFunctionSequenceException(const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& _Context,
-               const ::com::sun::star::uno::Any& _Next = 
::com::sun::star::uno::Any()) throw ( ::com::sun::star::sdbc::SQLException );
+void throwFunctionSequenceException(
+        const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& _Context,
+               const ::com::sun::star::uno::Any& _Next = 
::com::sun::star::uno::Any()
+    )
+    throw ( ::com::sun::star::sdbc::SQLException );
+
 
//----------------------------------------------------------------------------------
 /** throw a invalid index sqlexception
 */
-void throwInvalidIndexException(const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& _Context,
-               const ::com::sun::star::uno::Any& _Next = 
::com::sun::star::uno::Any()) throw ( ::com::sun::star::sdbc::SQLException );
+void throwInvalidIndexException(
+        const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& _Context,
+               const ::com::sun::star::uno::Any& _Next = 
::com::sun::star::uno::Any()
+    )
+    throw ( ::com::sun::star::sdbc::SQLException );
 
 
//----------------------------------------------------------------------------------
 /** throw a generic SQLException, i.e. one with an SQLState of S1000, an 
ErrorCode of 0 and no NextException
 */
-void throwGenericSQLException(const ::rtl::OUString& _rMsg, const 
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& 
_rxSource)
+void throwGenericSQLException(
+        const ::rtl::OUString& _rMsg,
+        const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& _rxSource
+    )
        throw (::com::sun::star::sdbc::SQLException);
 
 
//----------------------------------------------------------------------------------
@@ -201,11 +262,24 @@
     )
     throw (::com::sun::star::sdbc::SQLException);
 
+//----------------------------------------------------------------------------------
 /** throws an SQLException
 */
 void throwSQLException(
         const sal_Char* _pAsciiMessage,
         const sal_Char* _pAsciiState,
+        const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& _rxContext,
+        const sal_Int32 _nErrorCode = 0,
+        const ::com::sun::star::uno::Any* _pNextException = NULL
+    )
+    throw (::com::sun::star::sdbc::SQLException);
+
+//----------------------------------------------------------------------------------
+/** throws an SQLException
+*/
+void throwSQLException(
+        const sal_Char* _pAsciiMessage,
+        StandardSQLState _eSQLState,
         const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& _rxContext,
         const sal_Int32 _nErrorCode = 0,
         const ::com::sun::star::uno::Any* _pNextException = NULL




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

Reply via email to