-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for error reporting and logging #50
Conversation
This code will need tweaking, but I think it's a good start. I'd be happy to discuss it further before it's committed to the main fork. The biggest thing this new routine needs is an error check so that the log files won't exceed a pre-determined size.
Update from head
Deleted duplicate Star Trek question - one that was better-phrased is in q_39. Reformatted answer with punctuation in q_07
When this .c program is built, it will put a number at the beginning of each line question file. The result? Each question has a unique number and can be more easily referenced. If this program is used, PLEASE read the comments before running it.
@@ -359,6 +365,13 @@ def _stop(self, *args): | |||
self._save_game() | |||
self.factory.running = False | |||
|
|||
def _write_log(self, logfile, f, q): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really not a big fan of single letter variables.
I'm guessing 'f' is 'filename' and 'q' is question, but I abhor guessing what variables are supposed to mean and prefer more semantic names for things so there is no room for ambiguity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I should be able to make those changes tomorrow. Would you like me to wait though, @rawsonj ? Sounds like you may want to do some rewriting, or rethinking. |
issue #27 - added show correct answer when someone wins
Go ahead. I've been trying to find the time to do a rewrite of this bot for 3 years now. |
Closing this pull request. I haven't figured out yet how to separate unrelated commits. |
This code will need tweaking, but I think it's a good start. I'd be
happy to discuss it further before it's committed to the main fork. The
biggest thing this new routine needs is an error check so that the log
files won't exceed a pre-determined size.