Skip to content

Commit

Permalink
Adding in decoded error in exception args for better error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheng Lundquist committed Oct 16, 2024
1 parent ad32469 commit 4985939
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pypechain/core/contract_call_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def __init__(
# We explicitly define which init we're calling due to multiple inheritance,
# and handle passing in the correct arguments here
exception_args = args + orig_exception.args
if decoded_error is not None:
exception_args += (decoded_error,)
Exception.__init__(self, *exception_args)
self.orig_exception = orig_exception
self.decoded_error = decoded_error
Expand Down

0 comments on commit 4985939

Please sign in to comment.