Sign in to follow this  
gamechampionx

Simple Error-Handling Question

Recommended Posts

gamechampionx    140
I have a farily straightforward question. I'm making a game that's text-based in Java. At startup, it loads up all the information it needs from files in directories and whatnot. I'm coding in tight error handling for this, which I am fully capable of. I'm only wondering if, in the case of multiple errors, a user would rather see the entire list of errors, or just the first one. For example, if a character's file is in the wrong format, and a weapon is also in the wrong format, would you rather see the errors together, or just the first? The displayed messages are designed to be very easy to understand, and should make the problem very clear to even most people with little background in programming. I'm leaning toward the list option because it's more constent.

Share this post


Link to post
Share on other sites
THACO    234
I personally would like to see all errors, or at least the first error in all its glory then a note saying I have more and I can check the other ones if I want. That is just me, but I would get really annoyed if I fix one error then go back and get anther error msg that had I gotten sooner I could have fixed that at the same time. Good luck

-THACO

Share this post


Link to post
Share on other sites
bluemoon    122
Showing all errors probably isn't a good idea. Imagine a user playing your game and suddenly he is confronted with about 10 error messages! He is probably not going to read it all. I think the most important is the first error one anyway when it causes other errors. So u could do it like THACO said or (which I think is a little better) refer in your error message to a log file where you add all the error messages.

In case of your example (wrong Player, Weapon file format): Why would u let your game launch and let the user play if a file is not readable ? If you want your game still to run (although an error has occured), I would either show no error message at all (the user will see if there is no weapon) or display a message that an error has occured ... and then refer to the log file.

Share this post


Link to post
Share on other sites
matches81    474
I´d also would only like to see one error message in a game, if I really have to see one. But it´s greatly appreciated if this messages gives you some reason why the game shuts down, not just that crappy "Error! Will shut down now..." message.
The reason why I´d prefer to see only one message, and it should contain the first error is that if the program has encounter an error, the possibility is rather high, that the other errors are caused by the first one (except for your example with wrong file formats). And because I didn´t code that game I simply don´t care what other errors are caused by the first one... so I don´t see a reason to read the other error messages at all.
But: You could put in some start parameter which enables output of all errors encountered?

Share this post


Link to post
Share on other sites
SirLuthor    364
At least with the latest builds of my engine, all occurring exceptions, and to a lesser extent, errors, are logged to a file, and all of them are reported. However, this is really not a viable solution for the end-user, to them, it suffices to provide a basic reason for why the application is failing, possibly some hints on how to fix, or try to, fix the problem, and a referrence to a log, and some way to contact tech-support/developers. But only one error message. Any more then that, and it will just be frustrating.

Share this post


Link to post
Share on other sites
gamechampionx    140
I see the point of only having one error message displayed. I want to avoid just displaying something generic, because any error taking place will be as a result of the user modifying data in the files. Right now, if you for example, take a weapon with a price of 10, and change 10 to a non-numerical string, it will state "Error in weapon number whatever in the weapons directory". This will allow a person to re-edit the information. The cheap engine I'm building is meant to contain a dynamic number of items of each type, and build an array on startup.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this