debug: add try-catch around iframe render() to catch any JS errors
This commit is contained in:
parent
f4a25128ae
commit
4a5dab49b5
|
|
@ -436,7 +436,7 @@ body {
|
|||
if (msg.categories) state.categories = msg.categories;
|
||||
state.eventsLoaded = true;
|
||||
state.panelReady = true;
|
||||
render();
|
||||
try { render(); } catch(e) { try { window.parent.go.main.App.WriteDebugLog('[iframe] render error: ' + String(e) + ' ' + JSON.stringify({message: e.message, stack: e.stack?.substring(0,200)})); } catch(e2) {} }
|
||||
break;
|
||||
|
||||
case 'drop':
|
||||
|
|
|
|||
|
|
@ -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}))
|
||||
|
|
|
|||
Loading…
Reference in New Issue