diff options
Diffstat (limited to 'csharp/src/Ice/Exception.cs')
-rw-r--r-- | csharp/src/Ice/Exception.cs | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/csharp/src/Ice/Exception.cs b/csharp/src/Ice/Exception.cs index 4a05b30a00f..3fcda64934f 100644 --- a/csharp/src/Ice/Exception.cs +++ b/csharp/src/Ice/Exception.cs @@ -71,10 +71,21 @@ namespace Ice #endif /// <summary> + /// ice_name() is deprecated, use ice_id() instead. /// Returns the name of this exception. /// </summary> /// <returns>The name of this exception.</returns> - public abstract string ice_name(); + [System.Obsolete("ice_name() is deprecated, use ice_id() instead.")] + public string ice_name() + { + return ice_id().Substring(2); + } + + /// <summary> + /// Returns the type id of this exception. + /// </summary> + /// <returns>The type id of this exception.</returns> + public abstract string ice_id(); /// <summary> /// Returns a string representation of this exception, including @@ -207,20 +218,6 @@ namespace Ice protected UserException(SerializationInfo info, StreamingContext context) : base(info, context) {} #endif - public virtual void write__(IceInternal.BasicStream os__) - { - os__.startWriteException(null); - writeImpl__(os__); - os__.endWriteException(); - } - - public virtual void read__(IceInternal.BasicStream is__) - { - is__.startReadException(); - readImpl__(is__); - is__.endReadException(false); - } - public virtual void write__(OutputStream os__) { os__.startException(null); @@ -240,18 +237,8 @@ namespace Ice return false; } - protected abstract void writeImpl__(IceInternal.BasicStream os__); - protected abstract void readImpl__(IceInternal.BasicStream is__); - - protected virtual void writeImpl__(OutputStream os__) - { - throw new MarshalException("exception was not generated with stream support"); - } - - protected virtual void readImpl__(InputStream is__) - { - throw new MarshalException("exception was not generated with stream support"); - } + protected abstract void writeImpl__(OutputStream os__); + protected abstract void readImpl__(InputStream is__); } } |