Chapter 7: Debugging and Error Handling


Overview

"Errors happen, deal with it", as one of the early ASP.NET specifications stated. A bit abrupt, but it's true. We are, after all, only human. We make mistakes, and things go wrong. There's nothing wrong with admitting that. The important thing is not to panic, and to learn what to do. The best thing to do is not make the errors in the first place, but then that's not always so easy. Besides, errors aren't always your fault – pre-supplied software, users, and events beyond our control can cause plenty of trouble too.

In this chapter we're not only going to look at how to handle problems when they occur, but also how to code so that errors can be avoided, or at the very least, handled gracefully. So what we're going to look at is:

  • What compile errors are, and how to correct them

  • How to handle errors when the web page is running

  • How to prevent errors

  • How to find out what's going on in your code

  • How to debug your code

Some of this may seem a bit like 'real programming', but hey, that's what you are now – a real programmer. You can collect your badge after class.




Beginning Dynamic Websites with ASP. NET Web Matrix
Beginning Dynamic Websites: with ASP.NET Web Matrix (Programmer to Programmer)
ISBN: 0764543741
EAN: 2147483647
Year: 2003
Pages: 141

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net