University of Cincinnati logo and link  
Exceptions in Java
 
  UC ingot 
  • Exceptions allow you to work with problems that arise when your software runs.
    • They allow you to save work in progress, notify the user, and perhaps give the user a second chance.
  • Not all exceptions are user-generated.
    • Some can come from poor programming - let's try to avoid these.
    • Others may come from the system.  Network failure or losing an FTP connection, for instance.  In this case, you can sometimes set up a recursive retry algorythm.
    • And yes, many do come from the user.
  • Java's error trapping system is called exception handling.