I would like to catch every undefined function error thrown. Is there a global error handling facility in JavaScript? The use case is catching function calls from flash that
If you want unified way to handle both uncaught errors and unhandled promise rejections you may have a look on uncaught library.
EDIT
It listens window.unhandledrejection in addition to window.onerror.