-
-
Notifications
You must be signed in to change notification settings - Fork 146
Playground error messages are lacking #798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think for these things it would in general be nice to get the full error message in the browser console |
It appears only for a split second before being cleared: It also never crossed my mind that it would appear there. I assumed the playground was catching all errors and would display them since it is displaying some error message and has its own console. If we could display it in the playground console that could be helpful. |
Firefox and Chromium/V8 have different runtime errors for these sorts of things. Compare the errors thrown in each from doing something like |
The error message is fine. It's the lack of filename, frame, stacktrace, etc. that I think we could improve upon |
In my case playground doesn't show an error within the markup, in particular <script lang='ts'>
import { writable } from 'svelte/store'
let something = writable(0)
</script>
<button onclick={() => somthing.update(s => ++s)}>Hello {$something}!</button> |
It took me a long time to figure out what dumb thing I had done in this REPL:
https://svelte.dev/playground/hello-world?version=5.1.9#H4sIAAAAAAAAA3WQT2vDMAzFv4oqBtmoSeg1TQO7DXYZ7Lj04KVqanBsY2vdSsh3L2o71j_rTUjvPf2kAZ3uCUt835JlejUMK80aIumWzdbwDhWujaWE5ceAvAsilgaqX-tzCHk62FHhp070X7_1jslxwhKr1EYTuG5cw6YPPjK86Y5gHX0PWV5Mg-7o5MzmjROdJQaJhQVk3z7alQyq4i_JVYeMQUQjFHXjUCHTD2PJ8YtGdQf-fNkl_tXkzgECNhx_NsICHkL0IT0-za-gRZBLfYO9mdUvZK0_oU-qYjO7oV-Oe9H4FV2pAQAA
The error is simply:
It would really help to have at least a filename and ideally a line/col as well since multiple files and code locations may contain the same variable name.
The text was updated successfully, but these errors were encountered: