The code.ill.fr has been recreated and upgraded with the latest version this weekend, If you encounter any problem please inform the Helpdesk.

Commit 5cffc462 authored by eric pellegrini's avatar eric pellegrini
Browse files

Added better error handling when a job fail from the GUI

parent 4fe88cc8
Pipeline #4248 passed with stages
in 10 minutes and 46 seconds
......@@ -41,6 +41,7 @@ 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
......@@ -119,11 +120,13 @@ class JobPlugin(ComponentPlugin):
else:
startupinfo = None
subprocess.check_output([sys.executable, filename],stderr=subprocess.STDOUT)
time.sleep(1)
PUBLISHER.sendMessage("msg_start_job",message=None)
try:
subprocess.check_output([sys.executable, filename],stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
raise JobError(e.output)
else:
time.sleep(1)
PUBLISHER.sendMessage("msg_start_job",message=None)
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