[hydra-commits] kpfleming: branch techdemo/kpfleming/slicing r575 - in /techdemo/team/kpflemi...
SVN commits to the Hydra project
hydra-commits at lists.digium.com
Mon Apr 12 11:41:14 CDT 2010
Author: kpfleming
Date: Mon Apr 12 11:41:13 2010
New Revision: 575
URL: https://origsvn.digium.com/svn-view/hydra?view=rev&rev=575
Log:
incorporate brent's fix for exception slicing and clean up debugging leftovers
Modified:
techdemo/team/kpfleming/slicing/exceptions/AllTests.cpp
techdemo/team/kpfleming/slicing/exceptions/TestI.cpp
techdemo/team/kpfleming/slicing/objects/TestI.cpp
Modified: techdemo/team/kpfleming/slicing/exceptions/AllTests.cpp
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/exceptions/AllTests.cpp?view=diff&rev=575&r1=574&r2=575
==============================================================================
--- techdemo/team/kpfleming/slicing/exceptions/AllTests.cpp (original)
+++ techdemo/team/kpfleming/slicing/exceptions/AllTests.cpp Mon Apr 12 11:41:13 2010
@@ -839,7 +839,6 @@
catch(const Base& b)
{
test(b.b == "Base");
- cout << "ice_name is " << b.ice_name() << endl;
test(b.ice_name() =="Test::ClientUnsliceableDerived"); // *NOT* sliced by server
}
catch(...)
Modified: techdemo/team/kpfleming/slicing/exceptions/TestI.cpp
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/exceptions/TestI.cpp?view=diff&rev=575&r1=574&r2=575
==============================================================================
--- techdemo/team/kpfleming/slicing/exceptions/TestI.cpp (original)
+++ techdemo/team/kpfleming/slicing/exceptions/TestI.cpp Mon Apr 12 11:41:13 2010
@@ -17,8 +17,7 @@
class PreserverFactory : public IceInternal::UserExceptionFactory
{
public:
- virtual void createAndThrow() {
- cout << "factory throwing exception" << endl;
+ void createAndThrow() {
throw Preserver();
}
private:
@@ -26,31 +25,21 @@
{
public:
vector< ::Ice::Byte > __skippedSlices;
- virtual void __write(IceInternal::BasicStream* stream) const
+ void __write(IceInternal::BasicStream* stream) const
{
- cout << "writing skipped slices" << endl;
stream->writeBlob(__skippedSlices);
T::__write(stream);
}
- virtual void __read(IceInternal::BasicStream* stream, bool rid)
+ void __read(IceInternal::BasicStream* stream, bool rid)
{
- cout << "trying to get skipped slices" << endl;
stream->readSkippedSlicesBlob(__skippedSlices);
- cout << "got skipped slices of length " << __skippedSlices.size() << endl;
T::__read(stream, rid);
}
-
- ::Ice::Exception* ice_clone() const
- {
- return new Preserver(*this);
- }
-
void ice_throw() const
{
throw *this;
}
-
- virtual ~Preserver() throw() {}
+ ~Preserver() throw() {}
};
};
@@ -214,7 +203,7 @@
{
client->baseAsBase();
}
- catch (Base ex)
+ catch (const Base& ex)
{
throw;
}
@@ -227,7 +216,7 @@
{
client->unknownDerivedAsBase();
}
- catch (Base ex)
+ catch (const Base& ex)
{
throw;
}
@@ -240,7 +229,7 @@
{
client->unsliceableDerivedAsBase();
}
- catch (Base ex)
+ catch (const Base& ex)
{
throw;
}
Modified: techdemo/team/kpfleming/slicing/objects/TestI.cpp
URL: https://origsvn.digium.com/svn-view/hydra/techdemo/team/kpfleming/slicing/objects/TestI.cpp?view=diff&rev=575&r1=574&r2=575
==============================================================================
--- techdemo/team/kpfleming/slicing/objects/TestI.cpp (original)
+++ techdemo/team/kpfleming/slicing/objects/TestI.cpp Mon Apr 12 11:41:13 2010
@@ -18,21 +18,21 @@
class PreserverFactory : public Ice::ObjectFactory
{
public:
- virtual Ice::ObjectPtr create(const string& type) {
+ Ice::ObjectPtr create(const string& type) {
return new Preserver();
}
- virtual void destroy() {}
+ void destroy() {}
private:
class Preserver : virtual public T
{
public:
vector< ::Ice::Byte > __skippedSlices;
- virtual void __write(IceInternal::BasicStream* stream) const
+ void __write(IceInternal::BasicStream* stream) const
{
stream->writeBlob(__skippedSlices);
T::__write(stream);
}
- virtual void __read(IceInternal::BasicStream* stream, bool rid)
+ void __read(IceInternal::BasicStream* stream, bool rid)
{
stream->readSkippedSlicesBlob(__skippedSlices);
T::__read(stream, rid);
More information about the asterisk-scf-commits
mailing list