fix: Add error handling to initialization for better debugging

This commit is contained in:
Spicy_Marinara
2025-10-14 12:33:46 +02:00
parent 217833dc6c
commit aede293116
+5
View File
@@ -3107,6 +3107,7 @@ function onMessageSwiped(messageIndex) {
* Main initialization function. * Main initialization function.
*/ */
jQuery(async () => { jQuery(async () => {
try {
loadSettings(); loadSettings();
await addExtensionSettings(); await addExtensionSettings();
await initUI(); await initUI();
@@ -3123,4 +3124,8 @@ jQuery(async () => {
eventSource.on(event_types.MESSAGE_SWIPED, onMessageSwiped); eventSource.on(event_types.MESSAGE_SWIPED, onMessageSwiped);
// console.log('[RPG Companion] Extension loaded successfully'); // console.log('[RPG Companion] Extension loaded successfully');
} catch (error) {
console.error('[RPG Companion] Failed to initialize:', error);
throw error;
}
}); });