Is it expected that if a composeResource file fail...
# webassembly
c
Is it expected that if a composeResource file fails to load on wasmJs/js, it will completely stop composition and kill the ui? Dunno if there is a safer way to handle resource loading? Minus pre caching everything which seems a little heavy handed?
f
Could you wrap resource accesses with try/catch?
s
No try/catch inside composables unfortunately. But normally it doesn’t fail.
m
“But normally it doesn’t fail.” Famous last words for software developers 😉.
😄 1
f
You can load the resource yourself and use coil and wrap it with try/catch, that's what I do. If it fails I put in a missing texture image. I also have a way of restarting Compose entirely in case it fails but that requires a very special setup