It's a bit harsh to completely stop execution because a compiled asset is missing, making it hard to develop back-end related parts without necessarily having the latest compiled assets.
Also, we should probably only throw exceptions that we can actually catch, and since we only use get_svg in components, where we don't want the kind of logic that try...catch blocks are, that's another reason to not use this here.
I think the best solution is to simply fail silently by returning false.
It's a bit harsh to completely stop execution because a compiled asset is missing, making it hard to develop back-end related parts without necessarily having the latest compiled assets.
Also, we should probably only throw exceptions that we can actually
catch
, and since we only useget_svg
in components, where we don't want the kind of logic thattry...catch
blocks are, that's another reason to not use this here.I think the best solution is to simply fail silently by returning false.