Upgrade to Pro — share decks privately, control downloads, hide ads and more …

vueのエラーハンドリングについて調べた件

 vueのエラーハンドリングについて調べた件

VuejsOsaka#2でLTした内容です。

こっちにも書く予定です→ https://morimori-kochan.hatenablog.com/

morimorikochan

July 26, 2019
Tweet

More Decks by morimorikochan

Other Decks in Technology

Transcript

  1. • ໊લ ◦ morifuji ◦ twitter : @marooon88 ! ࢓ࣄ

    ◦ atmaגࣜձࣾ ◦ PHP/Nodejs αʔόʔαΠυΤϯδχΞ • झຯ ◦ kotlin ◦ switchͷΠϯσΟʔήʔϜ ▪ katana zero ▪ The friends of Ringo Ishikawa ୭ʁ
  2. ਌component ࢠcomponent̍ errorCaptured() errorCaptured() ࢠcomponent̎ errorCaptured() Vue.config.errorHandler() • ࣗ਎(ࢠcomponent̍)ͷerrorCaptured()͸ൃՐ͠ͳ͍ •

    ਌componentnͷerrorCaptured()͕ൃՐ͢Δ • ࠷ऴతʹ͸Vue.config.errorHandler()͕ൃՐ͢Δ errorCaptured VS Vue.config.errorHandler ࢠcomponent̍ͰΤϥʔൃੜ
  3. errorCaptured VS Vue.config.errorHandler ਌component ࢠcomponent̍ errorCaptured() errorCaptured() ࢠcomponent̎ errorCaptured() Vue.config.errorHandler()

    ࢠcomponent̍ͰΤϥʔൃੜ • ࣗ਎(ࢠcomponent̍)ͷerrorCaptured()͸ൃՐ͠ͳ͍ • ਌componentnͷerrorCaptured()͕ൃՐ͢Δ • ࠷ऴతʹ͸Vue.config.errorHandler()͕ൃՐ͢Δ falseΛฦ͢͜ͱͰ ਌΁ͷ఻೻ΛࢭΊΔ͜ͱ΋Մೳ
  4. Ͳ͜Ͱݕ஌͢Δͷʁʁ • window.onerror • errorCaptured • Vue.config.errorHandler Ͳ͜ʹू໿͢Δͷʁʁ • googleAnalytics

    • ϩάऩूαʔϏε ◦ Sentry←https://sentry.io/for/vue/ ◦ Rollbar←https://rollbar.com/blog/error-tracking-vue-js/
  5. Ͳ͜Ͱݕ஌͢Δͷʁʁ • window.onerror • errorCaptured • Vue.config.errorHandler Ͳ͜ʹू໿͢Δͷʁʁ • googleAnalytics

    • ϩάऩूαʔϏε ◦ Sentry←https://sentry.io/for/vue/ ◦ Rollbar←https://rollbar.com/blog/error-tracking-vue-js/