article

Friendly Error Handler

Email
Submitted on: 1/5/2015 1:30:00 PM
By: Hendry Cahyadi (from psc cd)  
Level: Intermediate
User Rating: By 5 Users
Compatibility: ASP (Active Server Pages), HTML
Views: 1248
 
     Creating a user friendly error handler. This Friendly Error Handler pops up a VB liked dialog box to display error messages.

This article has accompanying files

 
				

Error Handler 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.

Now, Friendly 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.

winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Intermediate category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)
 

To post feedback, first please login.