|
@@ -11,6 +11,7 @@ import {
|
|
initialState,
|
|
initialState,
|
|
onLoadInternalEvent,
|
|
onLoadInternalEvent,
|
|
state_name,
|
|
state_name,
|
|
|
|
+ exception_state_name,
|
|
} from "utils/context.js";
|
|
} from "utils/context.js";
|
|
import debounce from "/utils/helpers/debounce";
|
|
import debounce from "/utils/helpers/debounce";
|
|
import throttle from "/utils/helpers/throttle";
|
|
import throttle from "/utils/helpers/throttle";
|
|
@@ -698,7 +699,7 @@ export const useEventLoop = (
|
|
}
|
|
}
|
|
|
|
|
|
window.onerror = function (msg, url, lineNo, columnNo, error) {
|
|
window.onerror = function (msg, url, lineNo, columnNo, error) {
|
|
- addEvents([Event("state.frontend_event_exception_state.handle_frontend_exception", {
|
|
|
|
|
|
+ addEvents([Event(`${exception_state_name}.handle_frontend_exception`, {
|
|
stack: error.stack,
|
|
stack: error.stack,
|
|
})])
|
|
})])
|
|
return false;
|
|
return false;
|
|
@@ -707,7 +708,7 @@ export const useEventLoop = (
|
|
//NOTE: Only works in Chrome v49+
|
|
//NOTE: Only works in Chrome v49+
|
|
//https://github.com/mknichel/javascript-errors?tab=readme-ov-file#promise-rejection-events
|
|
//https://github.com/mknichel/javascript-errors?tab=readme-ov-file#promise-rejection-events
|
|
window.onunhandledrejection = function (event) {
|
|
window.onunhandledrejection = function (event) {
|
|
- addEvents([Event("state.frontend_event_exception_state.handle_frontend_exception", {
|
|
|
|
|
|
+ addEvents([Event(`${exception_state_name}.handle_frontend_exception`, {
|
|
stack: event.reason.stack,
|
|
stack: event.reason.stack,
|
|
})])
|
|
})])
|
|
return false;
|
|
return false;
|