Skip to content

Commit

Permalink
put exception name with message, more like Python exception
Browse files Browse the repository at this point in the history
  • Loading branch information
newville committed Jul 28, 2024
1 parent 1dec732 commit d837fb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asteval/astutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ def get_error(self):

out = [f" {self.expr}"]
if col_offset > 0:
out.append(f" {col_offset*' '}^^^")
out.append(str(self.msg))
out.append(f" {col_offset*' '}^^^^")
out.append(f"{exc_name}: {self.msg}")
return (exc_name, '\n'.join(out))


Expand Down

0 comments on commit d837fb9

Please sign in to comment.