diff options
author | Sascha Grunert <mail@saschagrunert.de> | 2016-11-16 15:21:41 +0100 |
---|---|---|
committer | Sascha Grunert <mail@saschagrunert.de> | 2016-11-16 15:21:41 +0100 |
commit | bf8ad423505027ae850bb6d0b3298e37a0ada766 (patch) | |
tree | b47a978f7b291c030c6684808958a01d78dc93c0 | |
parent | 965e33ebe80791ea788714933e78ab4dfff8a815 (diff) |
Improved main error handling
-rw-r--r-- | git-journal.fish | 72 | ||||
-rw-r--r-- | src/main.rs | 4 |
2 files changed, 38 insertions, 38 deletions
diff --git a/git-journal.fish b/git-journal.fish index af1a8f5..5585789 100644 --- a/git-journal.fish +++ b/git-journal.fish @@ -11,39 +11,39 @@ function __fish_using_command return 1 end -complete -c git-journal -n '__fish_using_command git-journal' -s p -l path -d 'Sets a custom working path.' -complete -c git-journal -n '__fish_using_command git-journal' -s n -l tags-count -d 'The number of tags until the parser stops when a single revision is given.' -complete -c git-journal -n '__fish_using_command git-journal' -s e -d 'A pattern to exclude git tags from the processing.' -complete -c git-journal -n '__fish_using_command git-journal' -s t -l template -d 'Use a custom output template.' -complete -c git-journal -n '__fish_using_command git-journal' -s o -l output -d 'The output file for the changelog.' -complete -c git-journal -n '__fish_using_command git-journal' -s a -l all -d 'Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'.' -complete -c git-journal -n '__fish_using_command git-journal' -s g -l generate -d 'Generate a fresh output template from a commit range.' -complete -c git-journal -n '__fish_using_command git-journal' -s s -l short -d 'Print only the shortlog (summary) form.' -complete -c git-journal -n '__fish_using_command git-journal' -s u -l skip-unreleased -d 'Skip entries without any relation to a git TAG.' -complete -c git-journal -n '__fish_using_command git-journal' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal' -f -a 'prepare' -complete -c git-journal -n '__fish_using_command git-journal' -f -a 'setup' -complete -c git-journal -n '__fish_using_command git-journal' -f -a 'verify' -complete -c git-journal -n '__fish_using_command git-journal' -f -a 'help' -complete -c git-journal -n '__fish_using_command git-journal' -f -a 'help' -complete -c git-journal -n '__fish_using_command git-journal prepare' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal prepare' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal prepare' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal prepare' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal setup' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal setup' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal setup' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal setup' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal verify' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal verify' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal verify' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal verify' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal help' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal help' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal help' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal help' -s V -l version -d 'Prints version information' -complete -c git-journal -n '__fish_using_command git-journal help' -s h -l help -d 'Prints help information' -complete -c git-journal -n '__fish_using_command git-journal help' -s V -l version -d 'Prints version information' +complete -c git-journal -n "__fish_using_command git-journal" -s p -l path -d "Sets a custom working path." +complete -c git-journal -n "__fish_using_command git-journal" -s n -l tags-count -d "The number of tags until the parser stops when a single revision is given." +complete -c git-journal -n "__fish_using_command git-journal" -s e -d "A pattern to exclude git tags from the processing." +complete -c git-journal -n "__fish_using_command git-journal" -s t -l template -d "Use a custom output template." +complete -c git-journal -n "__fish_using_command git-journal" -s o -l output -d "The output file for the changelog." +complete -c git-journal -n "__fish_using_command git-journal" -s a -l all -d "Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'." +complete -c git-journal -n "__fish_using_command git-journal" -s g -l generate -d "Generate a fresh output template from a commit range." +complete -c git-journal -n "__fish_using_command git-journal" -s s -l short -d "Print only the shortlog (summary) form." +complete -c git-journal -n "__fish_using_command git-journal" -s u -l skip-unreleased -d "Skip entries without any relation to a git TAG." +complete -c git-journal -n "__fish_using_command git-journal" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal" -f -a "prepare" +complete -c git-journal -n "__fish_using_command git-journal" -f -a "setup" +complete -c git-journal -n "__fish_using_command git-journal" -f -a "verify" +complete -c git-journal -n "__fish_using_command git-journal" -f -a "help" +complete -c git-journal -n "__fish_using_command git-journal" -f -a "help" +complete -c git-journal -n "__fish_using_command git-journal prepare" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal prepare" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal prepare" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal prepare" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal setup" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal setup" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal setup" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal setup" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal verify" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal verify" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal verify" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal verify" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal help" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal help" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal help" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal help" -s V -l version -d "Prints version information" +complete -c git-journal -n "__fish_using_command git-journal help" -s h -l help -d "Prints help information" +complete -c git-journal -n "__fish_using_command git-journal help" -s V -l version -d "Prints version information" diff --git a/src/main.rs b/src/main.rs index 731c93d..867a261 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,7 @@ use std::process::exit; use std::{env, fs, error}; use clap::{App, Shell}; -use gitjournal::{GitJournal, GitJournalResult, error}; +use gitjournal::{GitJournal, error}; fn error_and_exit(string: &str, error: Box<error::Error>) { error!("{}: {}", string, error); @@ -35,7 +35,7 @@ fn main() { } } -fn run() -> GitJournalResult<()> { +fn run() -> Result<(), Box<error::Error>> { // Load the CLI parameters from the yaml file let yaml = load_yaml!("cli.yaml"); let mut app = App::from_yaml(yaml).version(crate_version!()); |