|
@@ -54,13 +54,18 @@ window.addEventListener("unhandledrejection", function (event) {
|
|
|
|
|
|
try {
|
|
|
// 会造成死循环,logger.log 在网络异常的情况下,会有unhandledrejection
|
|
|
- logger({
|
|
|
- key: "unhandledrejection",
|
|
|
- cnl: ["console", "local", "server"],
|
|
|
- pgu: "AUTO",
|
|
|
- dtl: event.reason,
|
|
|
- ejn: JSON.stringify(event.reason),
|
|
|
- });
|
|
|
+ setTimeout(
|
|
|
+ () =>
|
|
|
+ logger({
|
|
|
+ key: "unhandledrejection",
|
|
|
+ cnl: ["console", "local", "server"],
|
|
|
+ pgu: "AUTO",
|
|
|
+ stk: JSON.stringify(event),
|
|
|
+ dtl: event.reason,
|
|
|
+ ejn: JSON.stringify(event.reason),
|
|
|
+ }),
|
|
|
+ 10 * 1000
|
|
|
+ );
|
|
|
console.trace(event);
|
|
|
} catch {
|
|
|
logger({
|