HTML and CSS Reference
Throughout this topic we have developed a web application. There is one notable step that
we have missed in this development however: a strategy for handling errors.
Errors can occur in a web application for many reasons, but it is worth subdividing errors
into two categories:
1. Errors that can be anticipated. An example of this is an AJAX call that fails because the
user is not connected to the Internet. We will call these exceptions, since they are exceptions
to the rule.
2. Errors that are not anticipated. These errors normally arise from programming bugs, such
as accessing an element in an array that does not exist, or accessing a property on an un-
defined object. We will call these errors, since they are errors in the implementation of the
software rather than run-time conditions.