Page

9.0.0- Error Handling

  by NT Community Manager.
Last Updated  by NT Community Manager.  

PublicCategorized as 09. Error Handling.

Not tagged.

Chapter99.1.0- Arrgh! I Goofed Again! >>


Error Handling

No matter how hard we try, it really is very difficult to write error-free software. We are inherently fallible. That's not to say it's impossible to write perfect software; it's just very hard, and takes effort, practice, diligence and lots of experience. Let's face facts; we all make mistakes occasionally!

 

So, given that we make these mistakes, how do we go about tracking them down? Most of the popular programming languages are supported by a rich set of development tools, and these tools usually include a debugger. However, it's a sad fact that web developers have all too often had to rely on the WYSINWYI or WYSIAAMEM approach to debugging – that's "What You See Is Not What You Intended" or "What You See Is An Arcane Microsoft Error Message".

 

In this chapter we are going to look at some good coding techniques, some debugging techniques and how we apply them to our ASP environment. You'll see how some additions to ASP 3.0 make life a lot easier than it used to be. In particular we will be looking at:

 

  • How to start debugging your ASP code
  • The difference between debugging client-side script and server-side script
  • Different types of errors
  • Good coding practices
  • How to debug your script
  • The Microsoft Script debugger
  • How the Server object can help us debug
  • The VBScript Err object and the ASPError object

 

Of course, none of these will make you a perfect programmer, but that's really a false goal anyway. The best that you can do is to understand your code, recognize where it might break, and be sure to handle possible error conditions. Making a mistake is acceptable, as long as you find out what the problem is quickly, and then learn from it.


Chapter99.1.0- Arrgh! I Goofed Again! >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |