Share via


ServerException 构造函数

定义

初始化 ServerException 类的新实例。

重载

ServerException()

使用默认属性初始化 ServerException 类的新实例。

ServerException(String)

用指定的消息初始化 ServerException 类的新实例。

ServerException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 ServerException 类的新实例。

ServerException()

使用默认属性初始化 ServerException 类的新实例。

public:
 ServerException();
public ServerException ();
Public Sub New ()

注解

ServerException 继承自 SystemException 类。 下表显示了 类实例 ServerException 的初始属性值:

属性 Value
InnerException null
Message 空字符串 (“”)

另请参阅

适用于

ServerException(String)

用指定的消息初始化 ServerException 类的新实例。

public:
 ServerException(System::String ^ message);
public ServerException (string message);
new System.Runtime.Remoting.ServerException : string -> System.Runtime.Remoting.ServerException
Public Sub New (message As String)

参数

message
String

描述该异常的消息。

注解

ServerException 继承自 SystemException 类。 下表显示了 类实例 ServerException 的初始属性值:

属性类型 条件
InnerException null
Message 字符串message

另请参阅

适用于

ServerException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 ServerException 类的新实例。

public:
 ServerException(System::String ^ message, Exception ^ InnerException);
public ServerException (string message, Exception InnerException);
new System.Runtime.Remoting.ServerException : string * Exception -> System.Runtime.Remoting.ServerException
Public Sub New (message As String, InnerException As Exception)

参数

message
String

解释异常原因的错误消息。

InnerException
Exception

导致当前异常的异常。 如果 InnerException 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。

注解

因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。 InnerException 属性将返回传递给构造函数的同一值;如果 InnerException 属性不向构造函数提供内部异常值,则返回 null

下表显示了 类实例 ServerException 的初始属性值:

属性 Value
InnerException 内部异常引用
Message 错误消息字符串

另请参阅

适用于