Skip to content
Snippets Groups Projects
Commit 5bd4e476 authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

Simulation exception htcfile

parent 01997758
No related branches found
No related tags found
No related merge requests found
Pipeline #9554 passed
...@@ -414,8 +414,11 @@ class HTCFile(HTCContents, HTCDefaults, HTCExtensions): ...@@ -414,8 +414,11 @@ class HTCFile(HTCContents, HTCDefaults, HTCExtensions):
log = stderr log = stderr
if errorcode or 'Elapsed time' not in log: if errorcode or 'Elapsed time' not in log:
raise Exception("\nstdout:\n%s\n--------------\nstderr:\n%s\n--------------\ncmd:\n%s" % log_lines = log.split("\n")
(str(stdout), str(stderr), cmd)) i = [i for i, l in enumerate(log_lines) if 'error' in l.lower()][0]
error_log = "\n".join(log_lines[i - 3:i + 3])
raise Exception("\nstdout:\n%s\n--------------\nstderr:\n%s\n--------------\nlog:\n%s\n--------------\ncmd:\n%s" %
(str(stdout), str(stderr), error_log, cmd))
return str(stdout) + str(stderr), log return str(stdout) + str(stderr), log
def deltat(self): def deltat(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment