You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
Platform
Linux x13 5.15.6-2-MANJARO #1 SMP PREEMPT Sat Dec 4 11:11:58 UTC 2021 x86_64 GNU/Linux
Description
Calling parse_units with an unknown unit panics.
I tried this code:
ethers::utils::parse_units("1234","ethe");
Which resulted in:
thread 'main' panicked at 'unrecognized units'
Because the function signature suggests problems are being reported as an error return value, I expected an error instead of a panic.
Please consider returning an error or documenting the panic behavior.
As a side note: If it's possible, please consider making the Error return type implement Send + Sync to improve the ergonomics with error handling crates like anyhow.
The text was updated successfully, but these errors were encountered:
Version
0.6.0
Platform
Linux x13 5.15.6-2-MANJARO #1 SMP PREEMPT Sat Dec 4 11:11:58 UTC 2021 x86_64 GNU/Linux
Description
Calling
parse_units
with an unknown unit panics.I tried this code:
Which resulted in:
Because the function signature suggests problems are being reported as an error return value, I expected an error instead of a panic.
Please consider returning an error or documenting the panic behavior.
As a side note: If it's possible, please consider making the Error return type implement Send + Sync to improve the ergonomics with error handling crates like
anyhow
.The text was updated successfully, but these errors were encountered: