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

Fix double Error wrapping #688

Merged
merged 1 commit into from Jun 29, 2020
Merged

Fix double Error wrapping #688

merged 1 commit into from Jun 29, 2020

Conversation

enumag
Copy link
Contributor

@enumag enumag commented Jun 29, 2020

Since $error already is an instance of the Error class this results in wrapping an Error by another Error which is useless and complicates error handling. In my opinion this should be fixed.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 86.311% when pulling 7efd5f9 on enumag:patch-8 into 2dcc81e on webonyx:master.

Copy link
Collaborator

@spawnia spawnia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, makes total sense.

@enumag
Copy link
Contributor Author

enumag commented Jun 29, 2020

Actually, since Error::$message is public maybe we can just prepend $messagePrelude and not create new Error instance at all. Thoughts?

@spawnia
Copy link
Collaborator

spawnia commented Jun 29, 2020

Actually, since Error::$message is public maybe we can just prepend $messagePrelude and not create new Error instance at all. Thoughts?

Not anymore, actually. Make sure your fork is up to date with the latest changes.

@enumag
Copy link
Contributor Author

enumag commented Jun 29, 2020

Ah, right, I'm locally on 0.13 still. In that case we can keep this PR as is.

@enumag
Copy link
Contributor Author

enumag commented Jun 29, 2020

Just realized I can't update to 0.14 yet due to overblog dependency. Is the v0.13 branch still maintained? Should I rebase this PR to target it instead?

@spawnia
Copy link
Collaborator

spawnia commented Jun 29, 2020

You can open another PR that targets https://github.com/webonyx/graphql-php/tree/0.13.x

Copy link
Member

@vladar vladar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@vladar vladar merged commit a73885f into webonyx:master Jun 29, 2020
@enumag enumag mentioned this pull request Jun 30, 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.

None yet

4 participants