Is it good practice to append a general exception catch when handling exceptions. an example may make this question clearer
try{
// do something
}catch(spomespecificException1 ex){
//logging and other stuff
}catch(spomespecificException2 ex){
//logging and other stuff
}catch(Exception ex){
//logging and other stuff
}
should i append the exception catch to the stack
You shouldn't be catching those exceptions at all, in general. Don't catch exceptions that you don't actually know how to handle.
"Handle" means fix. If you can't fix the problem, or if you can't add additional information, then don't catch the exception.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With