debug: add try-catch around iframe render() to catch any JS errors

This commit is contained in:
2026-06-08 13:43:13 +08:00
parent f4a25128ae
commit 4a5dab49b5
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -115,7 +115,9 @@
categories,
})
// Confirm delivery via Go log
try { window.go.main.App.WriteDebugLog('[CalendarPluginPage] calendar-data sent to iframe, events=' + events.length + ', categories=' + (categories?.length || 0)) } catch(e) {}
try { window.go.main.App.WriteDebugLog('[CalendarPluginPage] calendar-data sent to iframe, events=' + events.length + ', categories=' + (categories?.length || 0)) } catch(e) {
try { window.go.main.App.WriteDebugLog('[CalendarPluginPage] ERROR in WriteDebugLog: ' + String(e) + ' | eventsRaw=' + String(eventsRaw) + ' | typeof eventsRaw=' + typeof eventsRaw + ' | typeof events=' + typeof events + ' | events===' + JSON.stringify(events)) } catch(e2) {}
}
} catch (e) {
console.error('[CalendarPluginPage] loadCalendarData:', e)
console.log('[CalendarPluginPage] error details:', JSON.stringify({message: String(e), stack: e?.stack}))