Skip to content

Commit

Permalink
Fix some errors being logged twice
Browse files Browse the repository at this point in the history
  • Loading branch information
angelcaru committed May 26, 2024
1 parent bf81451 commit 951d1d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ def __init__(self, pos_start: Position, pos_end: Position, details: Optional[str
def as_string(self) -> str:
"""Return error as string"""
result = self.generate_radiation()
result += super().as_string()
result += f"{Log.deep_error(self.error_name, bold=True)}"
if self.details is not None:
result += f": {Log.light_error(self.details)}"
result += "\n" + string_with_arrows(self.pos_start.ftxt, self.pos_start, self.pos_end)
return result

Expand Down

0 comments on commit 951d1d8

Please sign in to comment.