Improvements #13301
openReport all JS errors in Wt
0%
Description
Currently, when the framework encounters an error, this error is sent over to the server as well (using function sendError()
from Wt.js
).
This reports all issues to do with client/server interaction. This can occur due to bad JavaScript added to the application, or widgets that do not render correctly.
Additionally, if an event occurs that exceeds any of the values defined in the configuration, this is also reported (like number of pending events or the size of a request being larger than allowed).
Scripts that are added to the application also get the same treatment, and if they fail to load, this is logged as well.
We, however, do not receive errors on JavaScript that is defined and sent over as part of the HTML text. There, JavaScript can be added to a widget as a handler on some event. Since this is added to HTML, the framework will render this out, but not check whether it is valid, since it is not immediately executed.
A configurable mechanism should be added so that Wt can be configured to catch ALL JavaScript exceptions on the page. Like window.onerror
. That way developers can be notified (by the error appearing in logs).
No data to display