Skip to content

Commit 03f3008

Browse files
feat(svelte): additional switch for v5/v4 (#13165)
1 parent d3e9500 commit 03f3008

File tree

1 file changed

+12
-1
lines changed
  • docs/platforms/javascript/guides/svelte

1 file changed

+12
-1
lines changed

docs/platforms/javascript/guides/svelte/index.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,18 @@ Once you've done this, the SDK will automatically capture unhandled errors and p
131131

132132
This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
133133

134-
```jsx {tabTitle:Svelte} {filename:SomeCmponent.svelte}
134+
```jsx {tabTitle:Svelte v5+} {filename:SomeCmponent.svelte}
135+
<button
136+
type="button"
137+
onclick={() => {
138+
throw new Error("Sentry Frontend Error");
139+
}}
140+
>
141+
Throw error
142+
</button>
143+
```
144+
145+
```jsx {tabTitle:Svelte v3/v4} {filename:SomeCmponent.svelte}
135146
<button
136147
type="button"
137148
on:click={() => {

0 commit comments

Comments
 (0)