Show exception-content for broken question files

This commit is contained in:
Sebastian Lohff 2013-12-03 23:18:46 +01:00
parent 87c9cbddaa
commit 160cf5ac4c
1 changed files with 7 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import sys
from PySide import QtGui, QtCore from PySide import QtGui, QtCore
from music import MusicBox from music import MusicBox
from question import Questions from question import Questions, QuestionException
from gamestate import GameState from gamestate import GameState
from game import SeopardyGame from game import SeopardyGame
from config import check_config from config import check_config
@ -24,7 +24,12 @@ if __name__ == '__main__':
parser = _parser() parser = _parser()
args = parser.parse_args() 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 # start gui
app = QtGui.QApplication([sys.argv[0]]) app = QtGui.QApplication([sys.argv[0]])