From 160cf5ac4cabac45ca49bc7bb4c9aedf3e2d31eb Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Tue, 3 Dec 2013 23:18:46 +0100 Subject: [PATCH] Show exception-content for broken question files --- seopardy.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/seopardy.py b/seopardy.py index 49d25ff..9458f94 100755 --- a/seopardy.py +++ b/seopardy.py @@ -7,7 +7,7 @@ import sys from PySide import QtGui, QtCore from music import MusicBox -from question import Questions +from question import Questions, QuestionException from gamestate import GameState from game import SeopardyGame from config import check_config @@ -24,7 +24,12 @@ if __name__ == '__main__': parser = _parser() args = parser.parse_args() - questions = Questions(args.questions) + questions = None + try: + questions = Questions(args.questions) + except QuestionException as e: + print(str(e), file=sys.stderr) + sys.exit(1) # start gui app = QtGui.QApplication([sys.argv[0]])