Skip to content
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

txscript: rename scriptError to makeError. #2270

Closed
wants to merge 1 commit into from

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Jul 16, 2020

This rename keeps error construction consistent across modules while confirming to the error handling infrastructure guidelines outlined in #2181.

This rename keeps error construction consistent
across modules while confirming to the error infrastructure guidelines.
@davecgh
Copy link
Member

davecgh commented Jul 16, 2020

I'm not really a fan of this change to be honest. There are different types of errors that can come out of the txscript package. I like that it is explicit.

@dnldd
Copy link
Member Author

dnldd commented Jul 16, 2020

The ErrorKind has the details of the type of error being created and that is present with makeError as well, I think the consistency across modules with error creation is more beneficial here. Do reconsider. Also different types of errors can be generated from txscript would it not be better to let the ErrorKind show that via makeError Instead of adding new constructors for the different error types added?

@davecgh davecgh added this to the 1.7.0 milestone Jul 17, 2020
@dnldd
Copy link
Member Author

dnldd commented Jul 17, 2020

After further discussion, my change does not explicitly show the class of error being created, only the error kind. I'll be closing this PR and reverting the changes made to the error helpers in other PRs as a result.

@dnldd dnldd closed this Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants