Fixed error handling for results with no taskID

This commit is contained in:
Michael Schmatz 2014-06-06 12:47:10 -07:00
parent 1486f31c37
commit 31bb9c8807

View file

@ -232,8 +232,11 @@ module.exports = class Simulator extends CocoClass
processResults: (simulationResults) ->
taskResults = @formTaskResultsObject simulationResults
console.error "*** Error: taskResults has no taskID ***\ntaskResults:", taskResults, "\ntask:", @task unless taskResults.taskID
@sendResultsBackToServer taskResults
unless taskResults.taskID
console.error "*** Error: taskResults has no taskID ***\ntaskResults:", taskResults
@cleanupAndSimulateAnotherTask()
else
@sendResultsBackToServer taskResults
sendResultsBackToServer: (results) ->
@trigger 'statusUpdate', 'Simulation completed, sending results back to server!'