Show exception-content for broken question files
This commit is contained in:
parent
87c9cbddaa
commit
160cf5ac4c
|
@ -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]])
|
||||
|
|
Loading…
Reference in New Issue