It's possible to catch all the errors related only to AlpineJs directives? #718
fabiofranzini
started this conversation in
4. General
Replies: 1 comment 9 replies
-
you can use window.onerror |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I post here the discussion that we had on Discord.
I need a way to be notified from AlpineJS for all errors that come from the directives.
If there are errors for example in the binding (or another directives), I'm able to see the errors log in the console but could be great to have a callback to catch this kind of errors to manage and do something like inform the user via UI.
I'm starting to build an application that permit the user to personalize at runtime the application using a code editor in page and AlpineJs as the framework.
So I need to intercepting and re-throwing errors from evaluation inside of Alpine using something like a custom event on the Alpine object.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions