mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Introduce CefV8Exception for returning detailed exception information from CefV8Value::ExecuteFunction*() and add the ability to re-throw exceptions. (issue #317).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@371 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -36,9 +36,9 @@ void UIT_InvokeScript(CefRefPtr<CefBrowser> browser)
|
||||
args.push_back(arg0);
|
||||
|
||||
CefRefPtr<CefV8Value> retVal;
|
||||
CefString exception;
|
||||
CefRefPtr<CefV8Exception> exception;
|
||||
if (evalFunc->ExecuteFunctionWithContext(v8Context, globalObj, args, retVal,
|
||||
exception)) {
|
||||
exception, false)) {
|
||||
if (retVal.get()) {
|
||||
frame->ExecuteJavaScript(
|
||||
std::string("alert('InvokeScript returns ") +
|
||||
@@ -47,7 +47,7 @@ void UIT_InvokeScript(CefRefPtr<CefBrowser> browser)
|
||||
} else {
|
||||
frame->ExecuteJavaScript(
|
||||
std::string("alert('InvokeScript returns exception: ") +
|
||||
exception.ToString() + "!');",
|
||||
exception->GetMessage().ToString() + "!');",
|
||||
url, 0);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user