diff options
author | Mark Spruiell <mes@zeroc.com> | 2009-02-02 10:15:06 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2009-02-02 10:15:06 -0800 |
commit | c1ce7caa97b3dd6f7536d5c3b8b482d823c51891 (patch) | |
tree | 85be09ca58cee5a9dffa27cbcf3ce67a0d2b25f2 /cpp/src/Slice/Parser.cpp | |
parent | Removed old makedist scripts (diff) | |
download | ice-c1ce7caa97b3dd6f7536d5c3b8b482d823c51891.tar.bz2 ice-c1ce7caa97b3dd6f7536d5c3b8b482d823c51891.tar.xz ice-c1ce7caa97b3dd6f7536d5c3b8b482d823c51891.zip |
bug 3644 - improve integration between eclipse plugin and translator
bug 3657 - improve error reporting in translators
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 5d682503ec3..6f156992afc 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -4714,8 +4714,7 @@ Slice::Operation::attributes() const } if(i == 2) { - cerr << definitionContext()->filename() << ":" << line() - << ": warning: invalid freeze metadata for operation" << endl; + emitWarning(definitionContext()->filename(), line(), "invalid freeze metadata for operation"); } else { @@ -4736,8 +4735,7 @@ Slice::Operation::attributes() const { if(result != 0 && (i == int(Supports) || i == int(Never))) { - cerr << definitionContext()->filename() << ":" << line() - << ": warning: invalid freeze metadata for operation" << endl; + emitWarning(definitionContext()->filename(), line(), "invalid freeze metadata for operation"); } else { @@ -4751,8 +4749,7 @@ Slice::Operation::attributes() const if(i == 4) { - cerr << definitionContext()->filename() << ":" << line() - << ": warning: invalid freeze metadata for operation" << endl; + emitWarning(definitionContext()->filename(), line(), "invalid freeze metadata for operation"); // // Set default @@ -5167,36 +5164,27 @@ Slice::Unit::setSeenDefinition() void Slice::Unit::error(const char* s) { - string file = currentFile(); - if(!file.empty()) - { - cerr << file << ':' << _currentLine << ": "; - } - cerr << s << endl; + emitError(currentFile(), _currentLine, s); _errors++; } void Slice::Unit::error(const string& s) { - error(s.c_str()); + emitError(currentFile(), _currentLine, s); + _errors++; } void Slice::Unit::warning(const char* s) const { - string file = currentFile(); - if(!file.empty()) - { - cerr << file << ':' << _currentLine << ": "; - } - cerr << "warning: " << s << endl; + emitWarning(currentFile(), _currentLine, s); } void Slice::Unit::warning(const string& s) const { - warning(s.c_str()); + emitWarning(currentFile(), _currentLine, s); } ContainerPtr |