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
Thanks for filing this! I agree, I think adding an expect instead of unwrap will fix this. Once I get through the existing PRs I'll fix this one as well.
When errors are made while developing, the panic error messages have
been improved instead of relying on the default panic message which is
extremely unhelpful.
Closes#574
For context, this is what was being read in
from_yaml()
:When running my program I got the very confusing:
thread 'main' panicked at 'called
Option::unwrap()on a
Nonevalue', ../src/libcore/option.rs:325
Looking at the backtrace, I was able to narrow it down to a
Arg::from_yaml()
not parsing correctly. But no idea where or why!The fix was easy: simply wrap 001 in quotes to make it a string. However, it was a bit annoying to figure it out.
It would be nice to see the context of the
panic!()
in these cases. For example, what arg setting failed.The text was updated successfully, but these errors were encountered: