Commit 5a2a7f4a authored by Samuel GAIST's avatar Samuel GAIST

[execution][local] Make the exception message more complete

This allows to know directly which algorithm failed
parent e08c9377
...@@ -314,12 +314,16 @@ class LocalExecutor(BaseExecutor): ...@@ -314,12 +314,16 @@ class LocalExecutor(BaseExecutor):
retval = self.loop_executor.setup() retval = self.loop_executor.setup()
if not retval: if not retval:
self.__cleanup() self.__cleanup()
raise RuntimeError("Loop algorithm setup failed") raise RuntimeError(
"Loop algorithm {} setup failed".format(self.algorithm.name)
)
prepared = self.loop_executor.prepare() prepared = self.loop_executor.prepare()
if not prepared: if not prepared:
self.__cleanup() self.__cleanup()
raise RuntimeError("Loop algorithm prepare failed") raise RuntimeError(
"Loop algorithm {} prepare failed".format(self.algorithm.name)
)
self.loop_executor.process() self.loop_executor.process()
...@@ -334,12 +338,14 @@ class LocalExecutor(BaseExecutor): ...@@ -334,12 +338,14 @@ class LocalExecutor(BaseExecutor):
retval = self.executor.setup() retval = self.executor.setup()
if not retval: if not retval:
self.__cleanup() self.__cleanup()
raise RuntimeError("Algorithm setup failed") raise RuntimeError("Algorithm {} setup failed".format(self.algorithm.name))
prepared = self.executor.prepare() prepared = self.executor.prepare()
if not prepared: if not prepared:
self.__cleanup() self.__cleanup()
raise RuntimeError("Algorithm prepare failed") raise RuntimeError(
"Algorithm {} prepare failed".format(self.algorithm.name)
)
_start = time.time() _start = time.time()
...@@ -352,7 +358,9 @@ class LocalExecutor(BaseExecutor): ...@@ -352,7 +358,9 @@ class LocalExecutor(BaseExecutor):
if not processed: if not processed:
self.__cleanup() self.__cleanup()
raise RuntimeError("Algorithm process failed") raise RuntimeError(
"Algorithm {} process failed".format(self.algorithm.name)
)
proc_time = time.time() - _start proc_time = time.time() - _start
......
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