[ # ] Windows System Error Codes
/* Posted March 11th, 2008 at 11:38am *//* Filed under Windows */
I’ve found when developing on Windows that printing error messages with the Windows system error code is immensely helpful in helping customers debug their problems with our software. While you may not want to use Windows’ error message, at the very least do yourself a favor and print the error code somewhere in there. It’s just a small little number but serves as a very useful reference if you ever want to look it up on MSDN. Recently, I had a foreign customer who was experiencing some problems with our software. His explanations were not very useful and neither was the error message our tool was printing out (something due to the non-English language Windows version he was using), and for the longest time I was unable to resolve the issue as things were getting lost in translation. One day he finally sent me a screen capture (literally captured with his digital camera) and lo and behold, my beloved error code was there in the message. Why he failed to report this important number initially I do not know, maybe he should read have this article. At any rate, with the error code I was able to narrow down the issue and eventually help him resolve the problem.
Usage of error codes doesn’t even have to be limited to Windows system codes. Why not come up with your own in your software? Sometimes our error messages are mighty similar and rather than searching through code with the error message string, wouldn’t it be easier to look it up with a custom error code? And let’s not forget cases where your error message may not even print out properly. In my case, it was real a lifesaver.
For your reference, I’m sharing the MSDN page that lists all Windows system error codes from my bookmarks:
http://msdn2.microsoft.com/en-us/library/ms681381.aspx
Related Posts
One Response to “Windows System Error Codes”
Comment from
kingkong5 [March 12, 2008, 3:18 pm]
You should write in some code so that if the user is acting like a baby, he will get a “Fetal Error”
Or if you really like Mortal Kombat, it could say “Fatal Error: Flawless Victory”
Mortal Kombat!













Leave a Reply
(* required)