Share via


runtime_exception 類別

C++ 加速大規模平行處理原則 (AMP) 程式庫中例外狀況的基底類型。

語法

class runtime_exception : public std::exception;

成員

公用建構函式

名稱 描述
runtime_exception建構函式 初始化 runtime_exception 類別的新執行個體。
~runtime_exception解構函式 runtime_exception終結 物件。

公用方法

名稱 描述
get_error_code 傳回造成例外狀況的錯誤碼。

公用運算子

名稱 描述
operator= 將指定 runtime_exception 之物件的內容複寫到這個物件中。

繼承階層架構

exception

runtime_exception

需求

標頭: amprt.h

命名空間: 並行

runtime_exception建構函式

初始化 類別的新執行個體。

語法

runtime_exception(
    const char * _Message,
    HRESULT _Hresult ) throw();

explicit runtime_exception(
    HRESULT _Hresult ) throw();

runtime_exception(
    const runtime_exception & _Other ) throw();

參數

_消息
造成例外狀況之錯誤的描述。

_Hresult
造成例外狀況之錯誤的 HRESULT。

_其他
runtime_exception 複製的物件。

傳回值

runtime_exception 物件。

~runtime_exception解構函式

終結 物件。

語法

virtual ~runtime_exception() throw();

get_error_code

傳回造成例外狀況的錯誤碼。

語法

HRESULT get_error_code() const throw();

傳回值

造成例外狀況之錯誤的 HRESULT。

operator=

將指定 runtime_exception 之物件的內容複寫到這個物件中。

語法

runtime_exception & operator= (    const runtime_exception & _Other ) throw();

參數

_其他
runtime_exception 複製的物件。

傳回值

這個 runtime_exception 物件的參考。

另請參閱

Concurrency 命名空間 (C++ AMP)