diff options
Diffstat (limited to 'csharp/src/Ice/Exception.cs')
-rw-r--r-- | csharp/src/Ice/Exception.cs | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/csharp/src/Ice/Exception.cs b/csharp/src/Ice/Exception.cs index 3fcda64934f..e07e9209a9c 100644 --- a/csharp/src/Ice/Exception.cs +++ b/csharp/src/Ice/Exception.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -using System.Diagnostics; +using System; using System.Globalization; using System.Runtime.Serialization; @@ -35,10 +35,8 @@ namespace Ice /// <summary> /// Base class for Ice exceptions. /// </summary> -#if !SILVERLIGHT - [System.Serializable] -#endif - public abstract class Exception : System.Exception, System.ICloneable + [Serializable] + public abstract class Exception : System.Exception, ICloneable { /// <summary> /// Creates and returns a copy of this exception. @@ -61,21 +59,19 @@ namespace Ice /// <param name="ex">The inner exception.</param> public Exception(System.Exception ex) : base("", ex) {} -#if !SILVERLIGHT /// <summary> /// Initializes a new instance of the exception with serialized data. /// </summary> /// <param name="info">Holds the serialized object data about the exception being thrown.</param> /// <param name="context">Contains contextual information about the source or destination.</param> protected Exception(SerializationInfo info, StreamingContext context) : base(info, context) {} -#endif /// <summary> /// ice_name() is deprecated, use ice_id() instead. /// Returns the name of this exception. /// </summary> /// <returns>The name of this exception.</returns> - [System.Obsolete("ice_name() is deprecated, use ice_id() instead.")] + [Obsolete("ice_name() is deprecated, use ice_id() instead.")] public string ice_name() { return ice_id().Substring(2); @@ -132,9 +128,7 @@ namespace Ice /// <summary> /// Base class for local exceptions. /// </summary> -#if !SILVERLIGHT - [System.Serializable] -#endif + [Serializable] public abstract class LocalException : Exception { /// <summary> @@ -149,22 +143,18 @@ namespace Ice /// <param name="ex">The inner exception.</param> public LocalException(System.Exception ex) : base(ex) {} -#if !SILVERLIGHT /// <summary> /// Initializes a new instance of the exception with serialized data. /// </summary> /// <param name="info">Holds the serialized object data about the exception being thrown.</param> /// <param name="context">Contains contextual information about the source or destination.</param> protected LocalException(SerializationInfo info, StreamingContext context) : base(info, context) {} -#endif } /// <summary> /// Base class for Ice run-time exceptions. /// </summary> -#if !SILVERLIGHT - [System.Serializable] -#endif + [Serializable] public abstract class SystemException : Exception { /// <summary> @@ -179,22 +169,18 @@ namespace Ice /// <param name="ex">The inner exception.</param> public SystemException(System.Exception ex) : base(ex) {} -#if !SILVERLIGHT /// <summary> /// Initializes a new instance of the exception with serialized data. /// </summary> /// <param name="info">Holds the serialized object data about the exception being thrown.</param> /// <param name="context">Contains contextual information about the source or destination.</param> protected SystemException(SerializationInfo info, StreamingContext context) : base(info, context) {} -#endif } /// <summary> /// Base class for Slice user exceptions. /// </summary> -#if !SILVERLIGHT - [System.Serializable] -#endif + [Serializable] public abstract class UserException : Exception { /// <summary> @@ -209,14 +195,12 @@ namespace Ice /// <param name="ex">The inner exception.</param> public UserException(System.Exception ex) : base(ex) {} -#if !SILVERLIGHT /// <summary> /// Initializes a new instance of the exception with serialized data. /// </summary> /// <param name="info">Holds the serialized object data about the exception being thrown.</param> /// <param name="context">Contains contextual information about the source or destination.</param> protected UserException(SerializationInfo info, StreamingContext context) : base(info, context) {} -#endif public virtual void write__(OutputStream os__) { |