OnUncaughtException and window.onerror cancellation

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

OnUncaughtException and window.onerror cancellation

Postby vroscigno » Tue Oct 17, 2023 12:51 pm

Hello, I have a global error handler established via
Code: Select all
addEventListener('error',...)
. and in the error handler
Code: Select all
error.cancelable
reports
Code: Select all
true
, however
Code: Select all
error.preventDefault()
and
Code: Select all
error.stopImmediatePropagation()
have no effect and
Code: Select all
CefRenderProcessHandler::OnUncaughtException()
is invoked regardless.

This behavior was unexpected as the JS exception was 'caught' and handled, but maybe this is by design because it is not possible to continue JS code execution and the result would be undefined.

Assuming that, is there any way in
Code: Select all
CefRenderProcessHandler::OnUncaughtException()
to determine that the top-level error handler cancelled the event via
Code: Select all
error.preventDefault()
or similar?

Thanks!
vroscigno
Newbie
 
Posts: 1
Joined: Tue Oct 17, 2023 12:37 pm

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 190 guests