is the most critcal thing to be considered when you build your application.
The more complex your application, the more probability of bug occurs inside
your application. Novice programmers usually never or hardly think about this,
so when an unexpected error occurs, the application will throw the user with
a very confusing words (the error text from script engine) and sometimes it
makes our user get more frustration since they don't know what happened and
what to do. Some more experience programmers have tackle this issue but usually
the application still shows the error text (but this one may be formatted well).
Howerver, the error text is not a bad thing as it's a mean to tell the support
person of what happened to our application. Some programmers prefer to rewrite
the error message so it will be more meaningful to our user. But some of our
users really allergic to see any error message as they got more frustration
with their work.
Error Handler will handle this thing. Instead of just showing the error text,
this error handler will pop up a modal dialogbox (looks like VB message box).
At first, this message box shows a generic message to tell our user that there's
an error inside the application, if our user get more interested to know the
details of the error, he could click on the detail button that will resize the
message box and shows error message in more detail. If he doesn't like the detail
message, he can click again on that button (the label changed!) and the message
box will resize to its original size and not display the error details. Along
with the message and detail button there're also other buttons, i.e.: Ok button
and Contact Webmaster button. The Ok button will close the dialog box and bring
back the user to the page where he comes from. The Contact Webmaster button
will get the user to a page that has been designed for error or bug reporting
center. The message box doesn't have to just have these buttons, feel free to
extend it to fit your needs.
So the main goal
of our error handler here is to make our user more happy. Have
fun exploring the code.