The unfortunate side effect of any program is errors and we’ve all had encounters with confusing error messages like “There was an error in variable callSec() F2b2”. Error messages are used to give the programmer information as well as the user. The information that the programmer needs is very different from the message that users want to see.
In my program, MTG Forge, I don’t really have an error handling strategy, like always writing the error to a file. When I am programming MTG Forge shows errors on the command line which my IDE (Word for programmers) displays. Unfortunately when MTG Forge is running as a normal program and an error occurs, nothing is displayed to the user. Obviously this is a major oversight and is a result bad planning.
The best way to handle errors is to have them automatically uploaded into a database on the Internet. This presumes that the program will always be online. Another good strategy is to have the program write the error message to a file, so the program can send the file when it is connected to the Internet or have the user e-mail the file.
In order to fix an error I need to know what the error message is (such as variable cardList is null), what is the line number, and what caused the error (like was the computer trying to use Elvish Piper?). Errors will happen in any computer program and you have to consider how your program will handle them.