From 49859398284dd5337338df7ee7e4465a6f6ab736 Mon Sep 17 00:00:00 2001 From: Sheng Lundquist Date: Wed, 16 Oct 2024 13:20:03 -0700 Subject: [PATCH] Adding in decoded error in exception args for better error messaging --- pypechain/core/contract_call_exception.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pypechain/core/contract_call_exception.py b/pypechain/core/contract_call_exception.py index 947ddeed..f3ec97cb 100644 --- a/pypechain/core/contract_call_exception.py +++ b/pypechain/core/contract_call_exception.py @@ -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