This repository was archived by the owner on Mar 15, 2018. It is now read-only.
Return error objects not strings (bug 1034326)#88
Merged
Conversation
8f8dca8 to
60cfafb
Compare
Contributor
There was a problem hiding this comment.
Could this be in the constructor or otherwise centralised?
Contributor
There was a problem hiding this comment.
Also if the constructor is updated to allow ditching the use of new, assigning the error object might be avoided completely.
Contributor
Author
There was a problem hiding this comment.
the only reason the object is assigned (in most cases) is for the logging. Hmm, I guess I could log in the constructor but that might be weird since constructing an error doesn't always mean you are returning an error.
Contributor
|
This is really nice. I think if the constructor is updated you'll be able to remove some repetition and make it easier to use. See the comments for details. r+wc |
6d1d747 to
73e538d
Compare
kumar303
added a commit
that referenced
this pull request
Mar 11, 2015
Return error objects not strings (bug 1034326)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@muffinresearch r?
Kind of a beast but I think this will make error handling a lot nicer.