CIS 35A: Introduction to Java Programming

Home | Green Sheet | Lectures | Assignments | FAQ | Grades

Exceptions

Exceptions handling
Custom exception classes
Exception-Handling Techniques

How to create your own exception class

  • Terminate program
    • Output appropriate error message upon termination
  • Fix error and continue
    • Repeatedly get user input
    • Output appropriate error message until valid value is entered
  • Log error and continue
    • Write error messages to file and continue with program execution
Previous | Create your own exception class | Use exception chaining | Exception-Handling Techniques | Next