Skip to content

Commit 75440ae

Browse files
committed
fix: preserve exception context with raise from
Signed-off-by: Shivakumar <shivakumarjagadish12@gmail.com>
1 parent 9edf1e1 commit 75440ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/account/account_create_transaction_create_with_alias.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def create_account_with_ecdsa_alias(client, main_private_key, alias_private_key,
122122
if new_account_id is None:
123123
try:
124124
new_account_id = response.get_receipt(client).account_id
125-
except Exception:
126-
raise RuntimeError("AccountID not found. Account may not have been created.")
125+
except Exception as err:
126+
raise RuntimeError("AccountID not found. Account may not have been created.") from err
127127

128128
print(f"✅ Account created with ID: {new_account_id}\n")
129129
return new_account_id

0 commit comments

Comments
 (0)