Skip to content

Handle JS exceptions in javascript-evaluation-complete. #52

Description

@aartaka

The code example in the documentation for webkit_web_view_run_javascript_finish () has a useful idiom in it:

exception = jsc_context_get_exception (jsc_value_get_context (value));
if (exception)
    g_warning ("Error running javascript: %s", jsc_exception_get_message (exception));
else
    g_print ("Script result: %s\n", str_value);
g_free (str_value);

Exposing JS error messages can be useful in debugging bigger things, so we should probably use jsc_context_get_exception in javascript-evaluation-complete callback. To do so:

How does that sound?

EDIT: Unmatched parentheses O_o

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions