-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
When a reactive statement throws an error, there is no mechanism to catch it.
- You cannot try/catch the reactive statement ($: has no effect outside of the top-level)
- window.onerror does not catch it
- window.onunhandledrejection does not catch it
The best you can do is try/catch inside a function that is reactively called, but my goal is to have a global exception handler to handle all exceptions that I did not expect...
Reproduction
https://svelte.dev/repl/d3a8223398e5414a9b19d63bf1b46a34?version=3.44.1
Logs
No response
System Info
System:
OS: Windows 10 10.0.19042
CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 30.93 GB / 63.90 GB
Binaries:
Node: 16.3.0 - C:\Program Files\nodejs\node.EXE
npm: 7.22.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.53)
npmPackages:
rollup: ^2.56.3 => 2.59.0
svelte: ^3.42.4 => 3.44.1Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels