Commit 4adafff1 authored by janis.streib's avatar janis.streib 🦉
Browse files

ADD: more error handlers

parent bd16d6a0
Pipeline #118660 passed with stages
in 12 minutes and 53 seconds
...@@ -300,12 +300,15 @@ async function init() { ...@@ -300,12 +300,15 @@ async function init() {
window.console.log(err, info) window.console.log(err, info)
EventBus.$emit('error', err) EventBus.$emit('error', err)
} }
window.onerror = function (message, source, lineno, colno, error) { window.onerror = function (message, source, lineno, colno, error) {
window.console.debug('window-error handler triggered') window.console.debug('window-error handler triggered')
window.console.log(error) window.console.log(error)
EventBus.$emit('error', error) EventBus.$emit('error', error)
} }
window.addEventListener('unhandledrejection', function (event) {
window.console.debug('unhanldedrejection handler triggered')
EventBus.$emit('error', event.reason)
})
Axios.interceptors.response.use( Axios.interceptors.response.use(
function (response) { function (response) {
return response return response
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment