mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
14 lines
191 B
Svelte
14 lines
191 B
Svelte
<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)}
|