#841 – Exceptions
May 10, 2013 1 Comment
An exception is something that happens in your application at run-time that is unexpected and which requires special logic in order for the application to continue executing normally. An exception may or may not be something that you anticipate in your code, but it is an event that is not part of the normal (expected) sequence of events.
Some examples of exceptions that might occur include:
- Your application tries invoking a method using a reference-typed variable that is set to null
- Your application is saving a file to disk and runs out of disk space
- Your application attempts doing some operation for which the current user does not have permissions
- Your application expects a value input by the user to represent a number and the user enters some text