From d46eb719edc4c1942075d6908d78db48d5c64b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren?= Date: Mon, 13 Dec 2021 12:13:21 +0100 Subject: [PATCH] Capture transaction signing/sending exceptions --- src/components/modals/SendModal.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/modals/SendModal.vue b/src/components/modals/SendModal.vue index 54c8897a1..b3f5e75d4 100644 --- a/src/components/modals/SendModal.vue +++ b/src/components/modals/SendModal.vue @@ -239,6 +239,8 @@ import { Amount, } from '@nimiq/vue-components'; import { parseRequestLink, AddressBook, Utf8Tools, CurrencyInfo, ValidationUtils } from '@nimiq/utils'; +import { captureException } from '@sentry/vue'; +import Config from 'config'; import Modal from './Modal.vue'; import ContactShortcuts from '../ContactShortcuts.vue'; import ContactBook from '../ContactBook.vue'; @@ -632,7 +634,8 @@ export default defineComponent({ } }, SUCCESS_REDIRECT_DELAY); } catch (error) { - // console.debug(error); + if (Config.reportToSentry) captureException(error); + else console.error(error); // eslint-disable-line no-console // Show error screen statusState.value = State.WARNING;