mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 23:37:32 +00:00
Merge pull request #2395 from loloicci/improve-doc-error-exit
Improve the document of exit of parse::Errors
This commit is contained in:
commit
42c03775b5
1 changed files with 3 additions and 1 deletions
|
@ -436,7 +436,9 @@ impl Error {
|
|||
)
|
||||
}
|
||||
|
||||
/// Prints the error to `stderr` and exits with a status of `1`
|
||||
/// Prints the error and exits. Depending on the error kind, this
|
||||
/// either prints to `stderr` and exits with a status of `1`
|
||||
/// or prints to `stdout` and exits with a status of `0`.
|
||||
pub fn exit(&self) -> ! {
|
||||
if self.use_stderr() {
|
||||
self.message.print().expect("Error writing Error to stderr");
|
||||
|
|
Loading…
Add table
Reference in a new issue