diff options
author | Ocke Janssen <oj@openoffice.org> | 2001-01-29 08:25:31 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2001-01-29 08:25:31 +0000 |
commit | ba9f5b194960f8a429c0602bdd4d5db1ea4f240d (patch) | |
tree | 460e8bca2f7fd77191c2692cf5f08531307aea5c /connectivity | |
parent | fbd21212ec941965b2a26cb2b6a7f79cd915e8ec (diff) |
change of error message
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/parse/sqlbison.y | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 603c9280c8e1..01248698ce4b 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -1,7 +1,7 @@ %{ //-------------------------------------------------------------------------- // -// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlbison.y,v 1.11 2001-01-26 12:05:55 oj Exp $ +// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlbison.y,v 1.12 2001-01-29 09:25:31 oj Exp $ // // Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. // @@ -9,7 +9,7 @@ // OJ // // Last change: -// $Author: oj $ $Date: 2001-01-26 12:05:55 $ $Revision: 1.11 $ +// $Author: oj $ $Date: 2001-01-29 09:25:31 $ $Revision: 1.12 $ // // Description: // @@ -4135,10 +4135,19 @@ void OSQLParser::reduceLiteral(OSQLParseNode*& pLiteral, sal_Bool bAppendBlank) void OSQLParser::error(sal_Char *fmt) { if(!m_sErrorMessage.getLength()) - { - m_sErrorMessage = m_pContext->getErrorMessage(OParseContext::ERROR_GENERAL); - m_sErrorMessage += ::rtl::OUString::createFromAscii(": "); - m_sErrorMessage += ::rtl::OUString(fmt,strlen(fmt),RTL_TEXTENCODING_UTF8);
+ {
+ ::rtl::OUString sStr(fmt,strlen(fmt),RTL_TEXTENCODING_UTF8);
+ ::rtl::OUString sSQL_TOKEN(::rtl::OUString::createFromAscii("SQL_TOKEN_"));
+
+ sal_Int32 nPos1 = sStr.indexOf(sSQL_TOKEN);
+ sal_Int32 nPos2 = sStr.indexOf(sSQL_TOKEN,nPos1+1);
+
+ ::rtl::OUString sFirst = sStr.copy(0,nPos1);
+ ::rtl::OUString sSecond = sStr.copy(nPos1+sSQL_TOKEN.getLength(),nPos2-nPos1-sSQL_TOKEN.getLength());
+ sFirst += sSecond;
+ sFirst += sStr.copy(nPos2+sSQL_TOKEN.getLength());
+ + m_sErrorMessage = sFirst;
::rtl::OUString aError = s_pScanner->getErrorMessage();
if(aError.getLength())
{
|