Skip to content

Instantly share code, notes, and snippets.

@enkot
Last active August 19, 2018 18:50
Show Gist options
  • Save enkot/ccc9f427e4c754317e6feb5c1780f6c7 to your computer and use it in GitHub Desktop.
Save enkot/ccc9f427e4c754317e6feb5c1780f6c7 to your computer and use it in GitHub Desktop.
// main.js
Vue.config.errorHandler = function (error) {
Toast.error(error.message)
console.warn(error.message)
}
// App.vue
@Component
export default class App extends Vue {
async created() {
const data = await api.getData() // throws Error
// ...
}
mounted() {
this.name = this.name.toUpperCase() // throws TypeError
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment