Commit Graph

10 Commits

Author SHA1 Message Date
Vgr E. Barry
c37631e90c Update handling of game modes
This change moves the game modes into their own `src/gamemodes.py`, and
also allows setting game modes via `gamemodes.py`.
2015-09-09 09:57:41 -04:00
Emanuel Barry
b3f30bbd91 Improve error handler
Now it will only pastebin the error when it has finished gathering it
all.
2015-08-27 10:02:56 -04:00
Vgr E.Barry
3534cc7d78 Better handle non-built-in exceptions 2015-08-10 09:49:52 -04:00
Vgr E.Barry
d58a9249ab Update error handler to ignore non-errors 2015-08-10 09:09:33 -04:00
Vgr E.Barry
38b7ef81e2 Add proper error handling. Closes #151
All exceptions, if not caught, are unconditionally sent to `sys.stderr`.
We only need to use our own custom class with some modifications and we
can intercept all errors, even those in threads (which #151 was about).
The only real downside from this practice is that `cli` is not
accessible to us when the errors happen, so I used a hack to set it on
an instance variable. If anyone can find a better solution, please step
forward. For the time being, this will have to do.

If for some obscure reason this class breaks, `sys.__stderr__` holds the
original `sys.stderr`
2015-08-06 12:29:47 -04:00
nyuszika7h
dd2d82392d Reorganize imports 2015-06-15 15:20:27 +02:00
Vgr E.Barry
5c4dcec8e6 Remove \x02 from console and file output 2015-06-14 16:31:29 -04:00
nyuszika7h
599ad45544 Reorganize imports 2015-04-07 12:01:59 +02:00
Vgr E.Barry
0727fb317c Fix faulty import 2015-04-04 07:39:56 -04:00
Vgr E.Barry
378334478c Move files around and update references 2015-04-04 07:39:54 -04:00