Skip to content
Snippets Groups Projects
Commit 43cc1ece authored by Stefano Nardo's avatar Stefano Nardo Committed by Ugo Albanese
Browse files

Merged in NRRPLT-8110-error-about-populations-after-brain-change (pull request #117)

[NRRPLT-8110] Fix the message error when set_brain fails and returns a list of Exceptions

Approved-by: Ugo Albanese
Approved-by: Antoine Detailleur
parent c8ec8c76
No related branches found
No related tags found
No related merge requests found
...@@ -644,9 +644,14 @@ class ROSCLEServer(SimulationServer): ...@@ -644,9 +644,14 @@ class ROSCLEServer(SimulationServer):
logger.exception(e) logger.exception(e)
return_value = [e.message, -1, -1] return_value = [e.message, -1, -1]
except Exception as e: # pylint:disable=broad-except except Exception as e: # pylint:disable=broad-except
logger.exception(e) message = e
if e.args:
message = e.args[0]
if isinstance(e.args[0], list):
message = [ex.message for ex in e.args[0]]
logger.exception(message)
line_no = extract_line_number(sys.exc_info()[2], tmp.name) line_no = extract_line_number(sys.exc_info()[2], tmp.name)
return_value = ["Error changing neuronal network: " + str(e), line_no, 0] return_value = ["Error changing neuronal network: " + str(message), line_no, 0]
return return_value return return_value
......
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