diff options
author | Jose <jose@zeroc.com> | 2011-12-07 01:29:37 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2011-12-07 01:29:37 +0100 |
commit | e621be781151af92e49d807a6fa5e964145ba0c6 (patch) | |
tree | 0c9698aa356c6ff4e81707e63cfd01e9a26e6116 /cpp/src/slice2cpp/Gen.cpp | |
parent | Glacier2 C++ SessionHelper VC100 fix (diff) | |
download | ice-e621be781151af92e49d807a6fa5e964145ba0c6.tar.bz2 ice-e621be781151af92e49d807a6fa5e964145ba0c6.tar.xz ice-e621be781151af92e49d807a6fa5e964145ba0c6.zip |
ICE-4594 Patch for local exception and C++ ice_print
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index ed0346f9dd8..5f314473123 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -800,7 +800,8 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) C << nl << "return " << flatName << ';'; C << eb; - if(p->isLocal()) + StringList metaData = p->getMetaData(); + if(find(metaData.begin(), metaData.end(), "cpp:ice_print") != metaData.end()) { H << nl << "virtual void ice_print(::std::ostream&) const;"; } @@ -7008,6 +7009,10 @@ Slice::Gen::MetaDataVisitor::validate(const SyntaxTreeBasePtr& cont, const Strin { continue; } + if(ExceptionPtr::dynamicCast(cont) && ss == "ice_print") + { + continue; + } emitWarning(file, line, "ignoring invalid metadata `" + s + "'"); } _history.insert(s); |