1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Nuxtのsentryモジュールでエラーを検知するときの注意点

Last updated at Posted at 2019-06-25

Nuxtのsentryモジュールでエラーを検知するときの注意点

以下のようにtryの中で例外が発生する場合は注意が必要です。このとき、sentryで通知するには this.$sentry.captureException(e)が必要なことに注意してください。

デフォルトでは、Uncaught Exceptionにしかsentryは機能しないからです。

    try {
        const a = 1
        a()
      } catch (e) {
        this.$sentry.captureException(e) // これが必要!
      }

参考 公式 https://github.com/nuxt-community/sentry-module

終わりに

私は現在、Web3のサービスの開発をしています。詳しくはこちらの記事をご覧下さい。
無料でイーサリアムが当たる、Web3時代の寄付サイトを作った話

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?