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 | |
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')
-rw-r--r-- | cpp/src/Freeze/ConnectionI.cpp | 7 | ||||
-rw-r--r-- | cpp/src/Freeze/EvictorI.cpp | 19 | ||||
-rw-r--r-- | cpp/src/Freeze/MapI.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Freeze/TransactionalEvictorContext.cpp | 8 | ||||
-rw-r--r-- | cpp/src/IceGrid/Util.cpp | 7 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 7 |
6 files changed, 6 insertions, 50 deletions
diff --git a/cpp/src/Freeze/ConnectionI.cpp b/cpp/src/Freeze/ConnectionI.cpp index 55132b869fd..234cb926390 100644 --- a/cpp/src/Freeze/ConnectionI.cpp +++ b/cpp/src/Freeze/ConnectionI.cpp @@ -196,10 +196,3 @@ Freeze::createConnection(const CommunicatorPtr& communicator, const string& envN { return new ConnectionI(SharedDbEnv::get(communicator, envName, &dbEnv)); } - -void -Freeze::TransactionAlreadyInProgressException::ice_print(ostream& out) const -{ - Exception::ice_print(out); - out << ":\ntransaction already in progress"; -} diff --git a/cpp/src/Freeze/EvictorI.cpp b/cpp/src/Freeze/EvictorI.cpp index 218ef399621..4a88a904113 100644 --- a/cpp/src/Freeze/EvictorI.cpp +++ b/cpp/src/Freeze/EvictorI.cpp @@ -358,22 +358,3 @@ Freeze::EvictorIBase::allDbs() const return result; } - -// -// Print for the various exception types. -// - -void -Freeze::EvictorDeactivatedException::ice_print(ostream& out) const -{ - Exception::ice_print(out); - out << ":\nevictor deactivated"; -} - -void -Freeze::NoSuchElementException::ice_print(ostream& out) const -{ - Exception::ice_print(out); - out << ":\nno such element"; -} - diff --git a/cpp/src/Freeze/MapI.cpp b/cpp/src/Freeze/MapI.cpp index c7f0719be30..83799f299e5 100644 --- a/cpp/src/Freeze/MapI.cpp +++ b/cpp/src/Freeze/MapI.cpp @@ -1925,14 +1925,6 @@ Freeze::DatabaseException::ice_print(ostream& out) const out << ":\n" << message; } - -void -Freeze::InvalidPositionException::ice_print(ostream& out) const -{ - Exception::ice_print(out); - out << ":\ninvalid position"; -} - void Freeze::IndexNotFoundException::ice_print(ostream& out) const { diff --git a/cpp/src/Freeze/TransactionalEvictorContext.cpp b/cpp/src/Freeze/TransactionalEvictorContext.cpp index d2fb2e2af10..34831301b2b 100644 --- a/cpp/src/Freeze/TransactionalEvictorContext.cpp +++ b/cpp/src/Freeze/TransactionalEvictorContext.cpp @@ -51,14 +51,6 @@ Freeze::TransactionalEvictorDeadlockException::ice_throw() const throw *this; } -void -Freeze::TransactionalEvictorDeadlockException::ice_print(ostream& out) const -{ - Exception::ice_print(out); - out << ":\ntransactional evictor deadlock exception"; -} - - // // TransactionalEvictorContext // diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp index 84e8a83550f..c16ff0fa4dd 100644 --- a/cpp/src/IceGrid/Util.cpp +++ b/cpp/src/IceGrid/Util.cpp @@ -17,13 +17,6 @@ using namespace std; using namespace Ice; using namespace IceGrid; -void -IceGrid::SynchronizationException::ice_print(ostream& out) const -{ - Exception::ice_print(out); - out << ":\nsynchronization exception"; -} - string IceGrid::toString(const vector<string>& v, const string& sep) { 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); |