Skip to content

Commit 12ded8e

Browse files
committed
Fixed vue example
1 parent 8e63aaf commit 12ded8e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

example/vue/src/components/HelloWorld.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
<h1>{{ msg }}</h1>
44

55
<p>
6-
This simple example will allow you to test the Exceptionless client configuration by submitting messages and errors.
6+
This simple example will allow you to test the Exceptionless client configuration by submitting messages and errors.
77
</p>
88

99
<button @click="throwError">Simulate Error</button>
10+
<button @click="throwUnhandledError" style="margin-left: 10px">Simulate Unhandled Error</button>
1011
<div v-if="state.error">
1112
<p>
12-
Error message sent to Exceptionless:
13+
Error message sent to Exceptionless:
1314
</p>
1415
<div style="margin-top: 20px;">
1516
<code style="padding: 20px; background: #282828; color: #fff;">{{state.error}}</code>
@@ -19,7 +20,8 @@
1920
</template>
2021

2122
<script setup>
22-
import { defineProps, reactive } from 'vue'
23+
import { defineProps, reactive } from 'vue';
24+
import { Exceptionless } from "@exceptionless/vue";
2325
2426
defineProps({
2527
msg: String
@@ -35,6 +37,10 @@ const throwError = async () => {
3537
await Exceptionless.submitException(error);
3638
}
3739
}
40+
41+
const throwUnhandledError = () => {
42+
throw new Error("Unhandled Vue Error");
43+
}
3844
</script>
3945

4046
<style scoped>

0 commit comments

Comments
 (0)