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

Show origin of warning in error message #6094

Merged
merged 1 commit into from Jan 25, 2021
Merged

Show origin of warning in error message #6094

merged 1 commit into from Jan 25, 2021

Conversation

Naktibalda
Copy link
Member

Fixes #6090

Codeception ErrorHandler wasn't very useful for investigating notices and warning, because it didn't show where the warning happened.

In ErrorHandler.php line 83:
                                     
  [PHPUnit\Framework\Exception (8)]  
  Undefined variable: file           
                                     

Exception trace:
  at /var/www/p2pr/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php:83
 Codeception\Subscriber\ErrorHandler->errorHandler() at /var/www/p2pr/vendor/codeception/module-symfony/

After applying this change, error message will tell the file and line of code where the warning originated.

[PHPUnit\Framework\Exception] Undefined variable: a at tests/unit/Codeception/Subscriber/ErrorHandlerTest.php:29

@Naktibalda Naktibalda force-pushed the 4.1-issue6090 branch 2 times, most recently from 3ab2fdf to ca9eb41 Compare January 23, 2021 19:21
@Naktibalda Naktibalda merged commit 05512a4 into 4.1 Jan 25, 2021
@Naktibalda Naktibalda deleted the 4.1-issue6090 branch January 25, 2021 17:18
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.

Exception [PHPUnit\Framework\Exception (8)] Undefined variable: file
2 participants