These are chat archives for kbknapp/clap-rs

27th
Mar 2017
mmacedo
@mmacedoeu
Mar 27 2017 22:14
hey guys
is there any example of error handling in clap ?
mmacedo
@mmacedoeu
Mar 27 2017 22:21
and what is this "just" command from README and docs, where to get it ?
Jonas Platte
@jplatte
Mar 27 2017 22:33

There is a link to it in the first paragraph it is mentioned in:

Alternatively, if you have just installed you can run the prebuilt recipies. Not using just is prfeclty fine as well, it simply bundles commands automatically.

mmacedo
@mmacedoeu
Mar 27 2017 22:35
@jplatte thanks ! cargo install just did the trick
where is get_matches() defined ? need this to know how is error handling like
@mmacedoeu To find API docs, you can always find the crate on docs.rs, go to the documentation tab and then search for the function or type you want to know more about :)
mmacedo
@mmacedoeu
Mar 27 2017 22:42
:smile:
Jonas Platte
@jplatte
Mar 27 2017 22:43
Huh, I guess I never even thought about handling errors myself
Makes sense though, in the common case you can't do any better than clap in correcting the user, and there is nothing to do other than exit.
One could say that it's unidiomatic that unsafe is the default here, but in this one case it was actually a positive surprise :D
(sorry I'm just kinda amazed that I never thought about this / saw get_matches_safe before :D)