Why should we catch super class exceptions?

Why should we catch super class exceptions?

Every exception is represented by the instance of Throwable or its subclasses. An object can carry the information for the exception raising point to the exception handler which catches it. When an exception is thrown, JVM abruptly completes the execution of expressions, statements, methods, invoking constructors etc. The process is continued until the process handler is found which indicates that particular exception by naming the super class of the class of that exception.
Why would we manually throw an exception?
When an exception is to be handled which are not java class library, a user defined exception can be thrown...
What is chained exceptions in java?
Once an application finds an exception, responds an exception by throwing another exception. It causes another exception. Knowing an exception that causes another exception is very useful...
When should we create our own custom exception classes? - Java
The term exception lets the programmer to know that there is something exceptional has occurred in the program. Apart from Java exception class library, a custom exception can be created by the developer...
Post your comment