diff options
author | Mark Spruiell <mes@zeroc.com> | 2007-11-05 12:19:49 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2007-11-05 12:19:49 -0800 |
commit | 3c8924663df8629b33c2ddd38907c4bf2eeb83cd (patch) | |
tree | 83b63f2396201019163d140555e42d79f82e46d3 /java/src/Ice/UserExceptionWriter.java | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
download | ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.tar.bz2 ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.tar.xz ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.zip |
- Fixing bug 2522 for Python. This involved adding the C++ class
UserExceptionWriter so that the Python extension can wrap a native
Python user exception into something that the C++ run time can
marshal. Also ported the changes to the servantLocator test.
- Implementing UserExceptionWriter in Java and C#.
- Consolidating the source files for the C# streaming API.
Diffstat (limited to 'java/src/Ice/UserExceptionWriter.java')
-rw-r--r-- | java/src/Ice/UserExceptionWriter.java | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/java/src/Ice/UserExceptionWriter.java b/java/src/Ice/UserExceptionWriter.java new file mode 100644 index 00000000000..a1d57e59573 --- /dev/null +++ b/java/src/Ice/UserExceptionWriter.java @@ -0,0 +1,57 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +package Ice; + +public abstract class UserExceptionWriter extends UserException +{ + public UserExceptionWriter(Communicator communicator) + { + _communicator = communicator; + } + + public abstract void + write(Ice.OutputStream os); + + public abstract boolean + usesClasses(); + + public void + __write(IceInternal.BasicStream os) + { + OutputStream stream = new OutputStreamI(_communicator, os); + write(stream); + } + + public void + __read(IceInternal.BasicStream is, boolean rid) + { + assert(false); + } + + public void + __write(Ice.OutputStream os) + { + write(os); + } + + public void + __read(Ice.InputStream is, boolean rid) + { + assert(false); + } + + public boolean + __usesClasses() + { + return usesClasses(); + } + + protected Communicator _communicator; +} |