Some examples of Javascript for error handling.