Hi.
I was just wondering how much error checking people put in their code, specifically those of you who have released commercial products.
I mean, do you check that a valid handle is returned every time you create a new type/bank/image etc.? Or do you just check when loading media and the like?
Well, I personally only check that all media has loaded correctly. When sound files don't load I assume that the user doesn't have a sound card (the old see if a WAV file loads to determine the presence of a sound card trick) and then simply don't attempt to play any sounds or music in the rest of the game.
I don't bother when creating Types, Banks or Images within the program - I assume they have always been created without a hitch. Not had any problems so far.
Maybe others will say different, although I do try and test any release on as many systems as possible.
I also check every possible outcome of If..Then, etc, conditions to ensure that the program reacts as it should - often forcing outcomes by setting variables at the relevant places to be sure.
OK, thanks JazzieB. ;)
TBH, it didn't even occur to me that I might need to check to see if a soundcard exists. :/
Anybody else with info? I think this is useful knowledge for everyone. C'mon all you famous, published people - let us know what/how you do error checking. :)