Skip to content

Handle late error when exception handler is active#1710

Merged
mvorisek merged 2 commits intodevelopfrom
fix_late_error_output_when_already_handling_ex
Nov 30, 2021
Merged

Handle late error when exception handler is active#1710
mvorisek merged 2 commits intodevelopfrom
fix_late_error_output_when_already_handling_ex

Conversation

@mvorisek
Copy link
Copy Markdown
Member

steps to reproduce:

  1. output some unwatend output (echo 'xx';)
  2. throw some exception

test for this should be added before merge

@mvorisek mvorisek requested a review from abbadon1334 November 29, 2021 14:25
@PhilippGrashoff
Copy link
Copy Markdown
Collaborator

Thumbs up for this one, very sensible.

Copy link
Copy Markdown
Collaborator

@abbadon1334 abbadon1334 left a comment

Choose a reason for hiding this comment

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

Preapprove it, agree to add a test, we need it to check for PSR7

@mvorisek mvorisek marked this pull request as ready for review November 29, 2021 23:48
@mvorisek mvorisek force-pushed the fix_late_error_output_when_already_handling_ex branch from 7b7dfe1 to 6246614 Compare November 30, 2021 01:36
@mvorisek
Copy link
Copy Markdown
Member Author

Merging, impossible to unit test as error/exception handler cannot be removed easily, as we do not know if the latest handler is the one set from the App - https://www.php.net/manual/en/function.restore-error-handler.php

Late errors can be tested with Behat only.

@mvorisek mvorisek merged commit d4be0d5 into develop Nov 30, 2021
@mvorisek mvorisek deleted the fix_late_error_output_when_already_handling_ex branch November 30, 2021 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants