There's some error rasied on my page, and vue-router warning:
[vue-router] Uncaught error during transition:
I wonder how to catch it and remove this warning? From vue-router's doc, I cannot find a hook function handle errors. I also tried to catch error
router.beforeEach((transition) => {
try {
transition.next()
} catch (e) {
transition.abort()
console.log('route caught', e)
}
})
Although I can catch the error now, but the warning still raised, and I don't know if I did the right thing.
And there is another warning when error raised
[vue-router] transition.next() should be called only once.
How to get rid of this?