Commit d206af09 authored by eric pellegrini's avatar eric pellegrini

Added better error handling when a job fail from the GUI

parent 5cffc462
Pipeline #4249 passed with stages
in 8 minutes and 51 seconds
......@@ -41,7 +41,6 @@ import wx.aui as aui
from MDANSE import PLATFORM,REGISTRY
from MDANSE.Framework.InputData.EmptyData import EmptyData
from MDANSE.Framework.Jobs.IJob import JobError
from MDANSE.GUI import PUBLISHER
from MDANSE.GUI.DataController import DATA_CONTROLLER
......@@ -123,10 +122,12 @@ class JobPlugin(ComponentPlugin):
try:
subprocess.check_output([sys.executable, filename],stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
raise JobError(e.output)
message = e.output
else:
time.sleep(1)
PUBLISHER.sendMessage("msg_start_job",message=None)
message = None
time.sleep(1)
PUBLISHER.sendMessage("msg_start_job",message=message)
def on_save(self, event=None):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment