-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
β¨ Stop if there is no tags in repo and release option is absent #15
Conversation
Nice :) I read that tomorrow, if I forgot just ping me! About the new dependencies, I think this is not a panic message since your message is here to help human using the CLI. |
If we wan't the error to be printed as a CLI, we should add it in But if we wan't the error to be printed as a lib, the message is fine where you put it.
|
What do you think?, I think the 1. is good enough |
Haha! I havenβt thought about the lib to be honest... π’
But yeah, I have thought of returning a type Result. Letβs do it. I like it π
I guess weβll have to deal with the error in the main then?
β¦ On 25 Feb 2019, at 8:57 AM, Fabien JUIF ***@***.***> wrote:
What do you think?
β
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yes! |
@@ -89,11 +91,17 @@ impl Changelog { | |||
Changelog { versions } | |||
} | |||
|
|||
pub fn to_markdown(&self, release: Option<&str>, print_authors: bool) -> String { | |||
pub fn to_markdown(&self, release: Option<&str>, print_authors: bool) -> Result<String, Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to expose the std::Error instead of our custom one?
Thank you master, I publish it right now in 0.4.0 |
Hello @fabienjuif π
This is my very first Rust contribution! π
After reading your code I think I've added the message at the right position. Please tell me if I'm wrong!
At first I was going to use
panic!
as I want to display a message and stop the program but the result is not human-friendly.I could have used human_panic but I didn't want to introduce a new dependency without talking to you first.
So here I am with a simple solution.
Happy to discuss! π
Fix #14