mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
chore(client): crash during serialization for CKEditor errors
This commit is contained in:
parent
5390bfdcab
commit
b566a188dc
@ -49,6 +49,13 @@ function setupGlobs() {
|
||||
const string = e?.reason?.message?.toLowerCase();
|
||||
|
||||
let message = "Uncaught error: ";
|
||||
let errorObjectString;
|
||||
|
||||
try {
|
||||
errorObjectString = JSON.stringify(e.reason)
|
||||
} catch (error: any) {
|
||||
errorObjectString = error.toString();
|
||||
}
|
||||
|
||||
if (string?.includes("script error")) {
|
||||
message += "No details available";
|
||||
@ -57,7 +64,7 @@ function setupGlobs() {
|
||||
`Message: ${e.reason.message}`,
|
||||
`Line: ${e.reason.lineNumber}`,
|
||||
`Column: ${e.reason.columnNumber}`,
|
||||
`Error object: ${JSON.stringify(e.reason)}`,
|
||||
`Error object: ${errorObjectString}`,
|
||||
`Stack: ${e.reason && e.reason.stack}`
|
||||
].join(", ");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user