Came across this sample from a certain multi-billion-dollar company, purporting to show how to implement exception handling. I slightly changed a few cosmetic details to make it anonymous.
try {
// ...
} catch (GeneralException e) {
if (e instanceof SpecificExceptionA){
// ...
} else if (e instanceof SpecificExceptionB){
// ...
}
}This is a true actual story--you can't make this stuff up. Yeah, I thought it was pretty hilarious; so I felt like I had to share it.
Comments
Post a Comment
You can use some HTML tags, such as <b>, <i>, and <a>.