Skip to content

Commit

Permalink
- added exception handler so that bug(s) leading to an AttributeError
Browse files Browse the repository at this point in the history
  exception don't end up in an exit(0), effectively masking it from our
  smoke tests;
  • Loading branch information
jaltmayerpizzorno committed Jun 29, 2021
1 parent cf77594 commit cb04356
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scalene/scalene_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,9 @@ def run_profiler(args: argparse.Namespace, left: List[str]) -> None:
except StopJupyterExecution:
# Running in Jupyter notebooks
pass
except AttributeError:
# don't let the handler below mask programming errors
raise
except Exception as ex:
template = "Scalene: An exception of type {0} occurred. Arguments:\n{1!r}"
message = template.format(type(ex).__name__, ex.args)
Expand Down

0 comments on commit cb04356

Please sign in to comment.