Add warning message when we fail due to syntax error and then we try to look up the class as a backup

This commit is contained in:
Kelly McDonald 2020-07-20 10:12:15 -04:00
parent de54b63e20
commit f415f22ccb
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,7 @@ from crc.models.file import FileDataModel, FileModel, FileType
from crc.models.workflow import WorkflowStatus, WorkflowModel, WorkflowSpecDependencyFile
from crc.scripts.script import Script
from crc.services.file_service import FileService
from crc import app
class CustomBpmnScriptEngine(BpmnScriptEngine):
@ -49,6 +50,8 @@ class CustomBpmnScriptEngine(BpmnScriptEngine):
except SyntaxError as e:
failedOnce = True
prevError = script
app.logger.warning('We experienced a syntax error, but we are going to try the old method on '
'"%s"'%script)
else:
commands = commands[1:]