Skip to content

Commit 07046b9

Browse files
committed
Raise error if failure to load FindSim file
1 parent 659b998 commit 07046b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

findSim.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,10 @@ def innerMain( exptFile, scoreFunc = defaultScoreFunc, modelFile = "", mapFile =
16011601
global pause
16021602
global sw
16031603
modelWarning = ""
1604-
expt, stims, readouts, model = loadJson( exptFile, mapFile )
1604+
try:
1605+
expt, stims, readouts, model = loadJson( exptFile, mapFile )
1606+
except:
1607+
raise SimError( "FindSim:innerMain failed to load file: {}".format( exptFile ) )
16051608
model.scoringFormula = scoreFunc # Override the earlier version.
16061609
readouts.tabulateOutput = tabulateOutput
16071610
readouts.generate = generate

0 commit comments

Comments
 (0)