- Code adapted from these good tutorials:
http://www.tutorialspoint.com/java/java_exceptions.htm
http://beginnersbook.com/2013/04/java-exception-handling/
