To summarize, you want to know how to write a robust program. Unfortunately, that's an art that takes experience and practice. There aren't really any tricks to it. Just know what errors could possibly happen and write code to handle them gracefully (such as with try..catch blocks).
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004