mirror of https://github.com/sveltejs/svelte
add Error to known globals, declare catch block parameter. fixes #3064
parent
f7479bc57b
commit
1fc4b1c867
@ -0,0 +1,13 @@
|
|||||||
|
<script>
|
||||||
|
let value = null;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<button on:click={event => {
|
||||||
|
try {
|
||||||
|
throw new Error('foo');
|
||||||
|
} catch (error) {
|
||||||
|
value = error;
|
||||||
|
}
|
||||||
|
}}>Click to create error</button>
|
||||||
|
|
||||||
|
{String(value)}
|
Loading…
Reference in new issue