Default Exception Handler in Java | Java Online Tutorials

This Java Online Tutorials 22.2 “Default Exception handler in Java” explains clearly reasons to handle exception, what is default exception handler and how JVM pass information to of Exception object to Default Exception handler to handled.


 

Exception Handling Process :

  • Exception is a class.
  • When problem(runtime error) occurs, exception Object will be created implicitly.
  • Exception object contains the complete information about runtime error.
    1. Name of error
    2. Type of error(Exception class name)
    3. State of error(Method, line number…)

 

  • When problem has raised, exception object will be created.
  • If we don’t handle the exception, will be submitted to Default Exception Handler by JVM.
  • Default Exception Handler is a pre-defined program than handles the exception with exception object information.
  • It is recommended to handle every exception before it reaches “Default Exception Handler”.

Default Exception Handler in Java

 

Share this