3 ms·
It makes sense to catch any exception in certain specific places. For example in this case, wrap the entire batch of code for loading the file, parsing and proc
by ufmace 6y ago
It makes sense to catch any exception in certain specific places. For example in this case, wrap the entire batch of code for loading the file, parsing and processing it, and displaying on the screen in a try-catch in whatever code builds and displays the wallpaper. Then if anything goes wrong, you can log the error, and do some sane recovery steps such as removing that wallpaper and reverting to some default wallpaper that you know is good.