IDataModelScriptClient::ReportError 方法 (dbgmodel.h)
如果在腳本執行或叫用期間發生錯誤,腳本提供者會呼叫 ReportError 方法來通知使用者介面錯誤。
腳本提供者可以在 Execute 或 InvokeMain 作業期間呼叫 ReportError 方法的任意次數。 客戶端決定如何將錯誤信息呈現給使用者。
語法
HRESULT ReportError(
ErrorClass errClass,
HRESULT hrFail,
PCWSTR message,
ULONG line,
ULONG position
);
參數
errClass
錯誤類別,其回報為 ErrorClass 列舉的成員。 如需此列舉的詳細資訊,請參閱 IDebugHostErrorSink檔。
hrFail
發生錯誤的 HRESULT。 如果錯誤的網域不是 HRESULT,應該以最適當的方式轉換成這類。
message
發生的錯誤訊息。
line
發生錯誤之腳本的一個行號。
position
發生錯誤的行內的一個基底位置(欄號)。
傳回值
此方法會傳回 HRESULT。
要求
要求 | 價值 |
---|---|
標頭 | dbgmodel.h |