Commit 1002f0c7 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

more error displayed

parent 7b163e4c
......@@ -184,7 +184,7 @@ class Workflow(threading.Thread):
self.status = self.STATUS_FAILED
self.end_time = time.time()
self._serialize()
raise RuntimeError('An error occurred when executing workflow: {0}'.format(e))
raise
self.component_nameids_is_init = True
self._serialize()
try:
......@@ -193,7 +193,7 @@ class Workflow(threading.Thread):
self.status = self.STATUS_FAILED
self.end_time = time.time()
self._serialize()
raise RuntimeError('An error occurred when executing workflow: {0}'.format(e))
raise
if len(self.components) > 0:
self._execute_weaver()
self._serialize()
......@@ -354,7 +354,7 @@ class Workflow(threading.Thread):
self.status = self.STATUS_FAILED
self.end_time = time.time()
self._serialize()
raise SyntaxError('An error occurred when compiling script: {0}'.format(e))
raise
self.components = []
# Once a weaver script is compiled, serialize the workflow
self._serialize()
......@@ -364,7 +364,7 @@ class Workflow(threading.Thread):
self.status = self.STATUS_FAILED
self.end_time = time.time()
self._serialize()
raise RuntimeError('An error occurred when executing DAG from directory {0}'.format(current_working_directory))
raise
def _get_current_make(self):
current_component, make_directory, new_make = [], None, False
......@@ -409,10 +409,8 @@ class Workflow(threading.Thread):
for class_name, obj in inspect.getmembers(sys.modules[modname], inspect.isclass):
if issubclass(obj, jflow.component.Component) and obj.__name__ != jflow.component.Component.__name__:
pckge[class_name] = modname
except NameError as e:
except Exception as e:
logging.getLogger("Workflow._import_components").debug("Component <{0}> cannot be loaded: {1}".format(modname, e))
except :
logging.getLogger("Workflow._import_components").debug("Component <{0}> cannot be loaded".format(modname))
# finally import workflows shared packages
workflows_dir = os.path.dirname(os.path.dirname(inspect.getfile(self.__class__)))
for importer, modname, ispkg in pkgutil.iter_modules([os.path.join(workflows_dir, "components")], "workflows.components."):
......@@ -421,8 +419,6 @@ class Workflow(threading.Thread):
for class_name, obj in inspect.getmembers(sys.modules[modname], inspect.isclass):
if issubclass(obj, jflow.component.Component) and obj.__name__ != jflow.component.Component.__name__:
pckge[class_name] = modname
except NameError as e:
logging.getLogger("Workflow._import_components").debug("Component <{0}> cannot be loaded: {1}".format(modname, e))
except Exception as e:
logging.getLogger("Workflow._import_components").debug("Component <{0}> cannot be loaded: {1}".format(modname, e))
return pckge
......
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