User: obo Date: 2006/07/10 07:25:45 Modified: dba/connectivity/source/drivers/dbase/DTable.cxx
Log: INTEGRATION: CWS qiq (1.94.2); FILE MERGED 2006/06/30 13:17:58 fs 1.94.2.1: during #i51143#: PROPERTY_ID_HY0000 superseded by StandardSQLState.SQL_GENERAL_ERROR File Changes: Directory: /dba/connectivity/source/drivers/dbase/ ================================================== File [changed]: DTable.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/dbase/DTable.cxx?r1=1.95&r2=1.96 Delta lines: +11 -9 -------------------- --- DTable.cxx 6 Jul 2006 14:17:15 -0000 1.95 +++ DTable.cxx 10 Jul 2006 14:25:43 -0000 1.96 @@ -937,7 +937,7 @@ sMsg += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); sMsg += _sColumnName; sMsg += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\" !")); - throw SQLException(sMsg,*this,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,Any()); + ::dbtools::throwGenericSQLException( sMsg, *this ); } //------------------------------------------------------------------ // erzeugt grundsaetzlich dBase IV Datei Format @@ -990,7 +990,7 @@ ::rtl::OUString sMsg = ::rtl::OUString::createFromAscii("Invalid column name length for column: "); sMsg += aName; sMsg += ::rtl::OUString::createFromAscii("!"); - throw SQLException(sMsg,*this,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,Any()); + ::dbtools::throwGenericSQLException( sMsg, *this ); } (*m_pFileStream) << aCol.getStr(); @@ -1105,16 +1105,16 @@ (*m_pFileStream) << (BYTE) dBaseIIIMemo; } // if (bCreateMemo) } - catch(const Exception& e) + catch ( const Exception& e ) { + (void)e; + try { // we have to drop the file because it is corrupted now DropImpl(); } - catch(const Exception&) - { - } + catch(const Exception&) { } throw; } return TRUE; @@ -1461,7 +1461,7 @@ } sMessage += aColName; sMessage += ::rtl::OUString::createFromAscii( "\"!"); - throw SQLException(sMessage,*this,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,Any()); + ::dbtools::throwGenericSQLException( sMessage, *this ); } } } @@ -1674,7 +1674,7 @@ throw SQLException( sMsg, *this, - bCharacterConversionError ? ::rtl::OUString::createFromAscii( "22018" ) : OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_HY0000 ), + bCharacterConversionError ? ::rtl::OUString::createFromAscii( "22018" ) : ::dbtools::getStandardSQLState( SQL_GENERAL_ERROR ), bCharacterConversionError ? 22018 : 1000, aSQLError ); @@ -2166,7 +2166,9 @@ String sName(m_Name); TempFile aTempFile(sName,&sExt,&sTempName); if(!aTempFile.IsValid()) - throw SQLException(::rtl::OUString::createFromAscii("Error while alter table!"),NULL,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,Any()); + ::dbtools::throwGenericSQLException( ::rtl::OUString::createFromAscii( "Error while alter table." ), + // TODO: resource + *this ); INetURLObject aURL; aURL.SetSmartProtocol(INET_PROT_FILE); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
