Skip to content

Commit 5cbe918

Browse files
authored
fix: handle errors encountered during init (#145)
1 parent 6eed2b4 commit 5cbe918

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: src/app/Flash.jsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,12 @@ export default function Flash() {
209209
})
210210

211211
// Initialize the manager
212-
qdlManager.current.initialize(imageManager.current)
213-
});
212+
return qdlManager.current.initialize(imageManager.current)
213+
})
214+
.catch((err) => {
215+
console.error('Error initializing Flash manager:', err)
216+
setError(ErrorCode.UNKNOWN)
217+
})
214218
}, [config, imageManager.current])
215219

216220
// Handle user clicking the start button

0 commit comments

Comments
 (0)