Ever try design by contract? With this ideology, your code expects certain things as input. If it does not receive valid input, it throws an exception. In turn for valid input, it will create valid output. If it does not give valid output, the original requester will throw an exception. The exceptions are generally handled via a top-level presentation handler, maybe in the form of a popup box that tells the user what the error was and where it occurred. This is useful for debugging and provides an aesthetically pleasing interface for the user and programmer.
Nathan Rose
Posts
-
I've been searching for an error handling comprehensive... -
I've been searching for an error handling comprehensive...DOH! I thought that might be the case, but just in case.. And let that be a lesson to anyone using On Error Resume Next :)
-
I've been searching for an error handling comprehensive...No! No! Bad idea! On Error Resume Next came straight from Satan's loins. Help! Keep it away! The problem with On Error Resume Next is that it continues to execute the rest of the code. Let's say that your entire code is dependent upon a single ID being populated. It's not populated because it generated an error. However, that error wasn't handled, it just goes to the next line of execution. The rest of your code will have to make special cases for when the all-important ID isn't populated. Now imagine if you have five IDs. The code becomes ugly. Another special example. You have a loop that goes from 1 to 10. However, the line that increments the iterator generates an error. Your loop now becomes infinite. The worst part is no error is ever generated to tell you what is happening. It just keeps spinning until you stop it in bewilderment.
-
TV: LCD or Plasma?I chose LCD. I have a 52 inch that I got last year. LCDs don't have the same problems as Plasma. LCDs are more portable, you just plug them in and they work, just like your normal TV. Plasma is a little more complex. They advise that you have them professionally installed. They're also a lot more fragile. And with my 1080p resolution, I couldn't tell the difference between the LCD and the Plasma at the store. Bluray looks awesome. LCD is less prone to screen burn. LCD TVs are also said to last twice as long (50,000 hours vs. 20,000 average).