tldraw/pages/create-error.tsx

16 lines
287 B
TypeScript
Raw Normal View History

2021-06-19 09:08:38 +00:00
export default function CreateError() {
return (
<div>
<button
onClick={() => {
if (window.confirm('Cause an error?')) {
throw Error('You caused an error!')
}
}}
>
Create an Error
</button>
</div>
)
}