ExceptionDetail 類別

定義

表示錯誤詳細資訊。Represents fault detail information.

public ref class ExceptionDetail
[System.Runtime.Serialization.DataContract]
public class ExceptionDetail
[<System.Runtime.Serialization.DataContract>]
type ExceptionDetail = class
Public Class ExceptionDetail
繼承
ExceptionDetail
屬性

備註

當服務傳送 ExceptionDetail,因而導致 System.ServiceModel.FaultExceptionServiceBehaviorAttribute.IncludeExceptionDetailInFaults 屬性設為 ServiceDebugBehavior.IncludeExceptionDetailInFaults 時,true 類別可以當做錯誤詳細資訊物件的型別參數。The ExceptionDetail class is the type parameter used as the fault detail object when a System.ServiceModel.FaultException is sent by a service as a result of setting the ServiceBehaviorAttribute.IncludeExceptionDetailInFaults or the ServiceDebugBehavior.IncludeExceptionDetailInFaults property to true.

若要傳送 ExceptionDetail 物件,型別必須可序列化。To send a ExceptionDetail object the type must be serializable. 如需序列化選項的詳細資訊,請參閱 指定服務合約中的資料傳輸For more information on serialization options, see Specifying Data Transfer in Service Contracts.

建構函式

ExceptionDetail(Exception)

從例外狀況 (Exception) 初始化 ExceptionDetail 類別的新執行個體。Initializes a new instance of the ExceptionDetail class from the exception.

屬性

HelpLink

取得或設定說明連結,這個連結來自傳遞給建構函式 (Constructor) 的例外狀況。Gets or sets the help link from the exception passed to the constructor.

InnerException

取得或設定表示內部例外狀況的 ExceptionDetail 物件。Gets or sets the ExceptionDetail object that represents the inner exception.

Message

取得或設定訊息,這個訊息來自傳遞給建構函式的例外狀況。Gets or sets the message from the exception passed to the constructor.

StackTrace

取得或設定堆疊追蹤資訊,這個資訊來自傳遞給建構函式的例外狀況。Gets or sets the stack trace information from the exception passed to the constructor.

Type

取得或設定傳遞給建構函式之例外狀況的型別字串。Gets or sets the type string for the exception passed to the constructor.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回傳遞給建構函式之例外狀況的例外狀況詳細資訊。Returns the exception detail information for the exception passed to the constructor.

適用於