interface ICoreWebView2ScriptException
interface ICoreWebView2ScriptException
: public IUnknown
This interface represents a JavaScript exception.
Summary
Members | Descriptions |
---|---|
get_ColumnNumber | The column number of the source where the exception occurred. |
get_LineNumber | The line number of the source where the exception occurred. |
get_Message | The Message is the exception's message and potentially stack. |
get_Name | The Name is the exception's class name. |
get_ToJson | This will return all details of the exception as a JSON string. |
If the CoreWebView2.ExecuteScriptWithResult result has Succeeded as false, you can use the result's Exception property to get the script exception.
Applies to
Product | Introduced |
---|---|
WebView2 Win32 | 1.0.2277.86 |
WebView2 Win32 Prerelease | 1.0.2357 |
Members
get_ColumnNumber
The column number of the source where the exception occurred.
public HRESULT get_ColumnNumber(UINT32 * value)
In the JSON it is exceptionDetail.columnNumber
. Note that this position starts at 0.
get_LineNumber
The line number of the source where the exception occurred.
public HRESULT get_LineNumber(UINT32 * value)
In the JSON it is exceptionDetail.lineNumber
. Note that this position starts at 0.
get_Message
The Message is the exception's message and potentially stack.
public HRESULT get_Message(LPWSTR * value)
In the JSON it is exceptionDetail.exception.description. This is the empty string if the exception doesn't have a description. This can happen if the script throws a non-Error object such as throw "abc";.
get_Name
The Name is the exception's class name.
public HRESULT get_Name(LPWSTR * value)
In the JSON it is exceptionDetail.exception.className
. This is the empty string if the exception doesn't have a class name. This can happen if the script throws a non-Error object such as throw "abc";
get_ToJson
This will return all details of the exception as a JSON string.
public HRESULT get_ToJson(LPWSTR * value)
In the case that script has thrown a non-Error object such as throw "abc";
or any other non-Error object, you can get object specific properties.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기