Java exceptions and errors.
Following are the best practices when catching and handling exceptions in your java code.
• Do not catch “Exception” directly in your code. Java exception handling is not polymorphic. If you catch Exception, it can catch IOException or any other descendent type. Catching Exceptions
• Exception handling supports the stack trace of any error in your code. Always throw an exception early in your code to make this