It’s caught by a higher-level catch if there is one.
Try blocks without a catch are a sign of any of these: poor coding, remnants from refactoring, features started and abandoned, possibly result of some build steps combining and optimising code.
Try blocks without a catch are a sign of any of these: poor coding, remnants from refactoring, features started and abandoned, possibly result of some build steps combining and optimising code.
async showImage() {
this.showLoadingSpinner = true
try {
this.imageData = await fetchImageData()
} finally {
this.showLoadingSpinner = false
}
}
There might be a parent class/component/whatever that deals with errors and shows them to the user. The image component is responsible for showing the loading spinner and it shouldn't be left spinning if there's an error.