ExceptionDispatchInfo.Throw 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Throw() |
在恢復捕捉異常時所儲存的狀態後,拋出由目前 ExceptionDispatchInfo 物件所代表的例外。 |
| Throw(Exception) |
拋出原始碼例外,保留原始 Watson 資訊,並增強而非替換原始堆疊追蹤。 |
Throw()
在恢復捕捉異常時所儲存的狀態後,拋出由目前 ExceptionDispatchInfo 物件所代表的例外。
public:
void Throw();
public void Throw();
member this.Throw : unit -> unit
Public Sub Throw ()
備註
當例外被恢復時,堆疊追蹤中會插入以下字串以指示還原點: "End of stack trace from the previous location where the exception was thrown"。 這類似於堆疊追蹤中表示內部例外或封存例外的方式。
適用於
Throw(Exception)
拋出原始碼例外,保留原始 Watson 資訊,並增強而非替換原始堆疊追蹤。
public:
static void Throw(Exception ^ source);
public static void Throw(Exception source);
static member Throw : Exception -> unit
Public Shared Sub Throw (source As Exception)
參數
- source
- Exception
該例外的狀態被捕獲後再重新拋出。