Skip to content

Commit

Permalink
Merge pull request #1565 from davesque/add-error-context
Browse files Browse the repository at this point in the history
Add context information to some error messages
  • Loading branch information
jacqueswww committed Aug 7, 2019
2 parents 530dbba + 17248b7 commit e9f3d56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vyper/parser/stmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,11 +1020,13 @@ def get_target(self, target):
"Cannot modify storage inside %s: %s" % (
self.context.pp_constancy(),
target.annotation,
)
),
self.stmt,
)
if not target.mutable:
raise ConstancyViolationException(
"Cannot modify function argument: %s" % target.annotation
"Cannot modify function argument: %s" % target.annotation,
self.stmt,
)
return target

Expand Down

0 comments on commit e9f3d56

Please sign in to comment.