mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 11:01:41 +00:00
fix: add try catch to application.js so can notify js errors with the console #13578
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
504f30997e
commit
764fd70e06
1 changed files with 15 additions and 5 deletions
|
@ -2,11 +2,21 @@
|
|||
|
||||
import { Notifier } from '@airbrake/browser'
|
||||
|
||||
window.airbrake = new Notifier({
|
||||
projectId: window.env.AIRBRAKE_SITE_ID,
|
||||
projectKey: window.env.AIRBRAKE_API_KEY,
|
||||
host: window.env.PANEL_URL
|
||||
})
|
||||
try {
|
||||
window.airbrake = new Notifier({
|
||||
projectId: window.env.AIRBRAKE_PROJECT_ID,
|
||||
projectKey: window.env.AIRBRAKE_PROJECT_KEY,
|
||||
host: window.env.PANEL_URL
|
||||
});
|
||||
|
||||
console.originalError = console.error;
|
||||
console.error = (...e) => {
|
||||
window.airbrake.notify(e.join(" "));
|
||||
return console.originalError(...e);
|
||||
};
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
import 'core-js/stable'
|
||||
import 'regenerator-runtime/runtime'
|
||||
|
|
Loading…
Reference in a new issue