Skip to content

Conversation

clue
Copy link
Owner

@clue clue commented Oct 17, 2021

This changeset improves error reporting by appending previous exception messages for Throwables (PHP 7+). This improves DX by making it easier to see the underlying error causes without having to check the previous exception via $e->getPrevious().

Ideally, this would just throw the Throwable without wrapping this in an UnexpectedValueException, but this would constitute a BC break. Appending the original type and message to the UnexpectedValueException at least makes it more obvious to see the underlying error condition without introducing a BC break.

Supersedes / closes #52
Supersedes / closes #56
Builds on top of #7/#27/#42
Refs reactphp/promise-stream#26, friends-of-reactphp/mysql#141 and others

@SimonFrings SimonFrings merged commit 848d45b into clue:master Oct 17, 2021
@clue clue deleted the throwables branch October 17, 2021 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants