Skip to content

Commit

Permalink
Write original error message to stderr before reraising exception tri…
Browse files Browse the repository at this point in the history
…ggered in remote job
  • Loading branch information
bernstei committed Oct 31, 2024
1 parent b71283a commit 875dfad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions expyre/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,10 @@ def get_results(self, timeout=3600, check_interval=30, sync=True, sync_all=True,
# reraise python exception that caused job to fail
with open(self.stage_dir / "_expyre_job_exception", "rb") as fin:
exc = pickle.load(fin)
sys.stderr.write(f'Remote job {self.id} failed with exception '
f'error_msg {error_msg}\n'
f'stdout: {stdout}\nstderr: {stderr}\n'
f'job stdout: {job_stdout}\njob stderr: {job_stderr}')
raise exc
else:
raise ExPyReJobDiedError(f'Remote job {self.id} failed with no exception but remote status {remote_status} '
Expand Down

0 comments on commit 875dfad

Please sign in to comment.