summaryrefslogtreecommitdiff
path: root/idlc/source/errorhandler.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2003-10-20 12:07:22 +0000
committerOliver Bolte <obo@openoffice.org>2003-10-20 12:07:22 +0000
commit7ba05d25bbc722dde754450c74faadd56535715a (patch)
tree76202052b9dea381144b836b475872ead88058f0 /idlc/source/errorhandler.cxx
parent4af7c70394fb6b9b545fc0ed831ebc0f6eddd559 (diff)
INTEGRATION: CWS sdk08 (1.3.24); FILE MERGED
2003/09/16 13:42:41 jsc 1.3.24.1: #111025# warning support
Diffstat (limited to 'idlc/source/errorhandler.cxx')
-rw-r--r--idlc/source/errorhandler.cxx47
1 files changed, 37 insertions, 10 deletions
diff --git a/idlc/source/errorhandler.cxx b/idlc/source/errorhandler.cxx
index e49e24fb62c2..263a7833534c 100644
--- a/idlc/source/errorhandler.cxx
+++ b/idlc/source/errorhandler.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: errorhandler.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2003-03-26 12:11:08 $
+ * last change: $Author: obo $ $Date: 2003-10-20 13:07:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -167,6 +167,8 @@ static sal_Char* warningCodeToMessage(WarningCode wCode)
return "request id conflict in inheritance tree: ";
case WIDL_TYPE_IDENT_CONFLICT:
return "type and parameter|member name are equal: ";
+ case WIDL_WRONG_NAMING_CONV:
+ return "type or identifier doesn't fulfill the UNO naming convention: ";
}
return "unkown warning";
}
@@ -530,22 +532,47 @@ void ErrorHandler::error3(ErrorCode e, AstDeclaration* d1, AstDeclaration* d2, A
idlc()->incErrorCount();
}
+void ErrorHandler::warning0(WarningCode w, const sal_Char* warningmsg)
+{
+ if ( idlc()->getOptions()->isValid("-w") || idlc()->getOptions()->isValid("-we") ) {
+ warningHeader(w);
+ fprintf(stderr, "%s\n", warningmsg);
+ }
+
+ if ( idlc()->getOptions()->isValid("-we") )
+ idlc()->incErrorCount();
+ else
+ idlc()->incWarningCount();
+}
+
void ErrorHandler::warning1(WarningCode w, AstDeclaration* d)
{
- warningHeader(w);
- fprintf(stderr, "'%s'\n", d->getScopedName().getStr());
- idlc()->incErrorCount();
+ if ( idlc()->getOptions()->isValid("-w") || idlc()->getOptions()->isValid("-we") ) {
+ warningHeader(w);
+ fprintf(stderr, "'%s'\n", d->getScopedName().getStr());
+ }
+
+ if ( idlc()->getOptions()->isValid("-we") )
+ idlc()->incErrorCount();
+ else
+ idlc()->incWarningCount();
}
void ErrorHandler::warning2(WarningCode w, AstDeclaration* d1, AstDeclaration* d2)
{
- warningHeader(w);
- fprintf(stderr, "'%s', '%s'\n", d1->getScopedName().getStr(),
- d2->getScopedName().getStr());
- idlc()->incErrorCount();
+ if ( idlc()->getOptions()->isValid("-w") || idlc()->getOptions()->isValid("-we") ) {
+ warningHeader(w);
+ fprintf(stderr, "'%s', '%s'\n", d1->getScopedName().getStr(),
+ d2->getScopedName().getStr());
+ }
+
+ if ( idlc()->getOptions()->isValid("-we") )
+ idlc()->incErrorCount();
+ else
+ idlc()->incWarningCount();
}
-void ErrorHandler::syntaxError(ParseState ps, sal_Int32 lineNumber, sal_Char* errmsg)
+void ErrorHandler::syntaxError(ParseState ps, sal_Int32 lineNumber,const sal_Char* errmsg)
{
errorHeader(EIDL_SYNTAX_ERROR, lineNumber);
fprintf(stderr, "%s: %s\n", parseStateToMessage(ps), errmsg);