Skip to content

Conversation

@benja-M-1
Copy link
Contributor

@benja-M-1 benja-M-1 commented Jan 22, 2022

This PR allows displaying the stack trace when an error is thrown in a worker. The stack trace is only displayed when either -v, -vv or -vvv is passed to the analyse command.

I believed the message could also be improved. For example, the error says "[...] in file src/...". However, it is the analysed file, not the file in which the error occurred.

This is the result:
image

Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

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

Please modify it a bit - if you see the stack trace already, you don't have to run it with --debug.

And if the stack trace output isn't enabled, the correct advice is -v, not --debug.

@benja-M-1
Copy link
Contributor Author

Ineed, I updated the help message.

@benja-M-1 benja-M-1 marked this pull request as ready for review January 22, 2022 10:18
@ondrejmirtes
Copy link
Member

This still isn't correct. The message "Run PHPStan with -v option" is going to be printed even when the user is already running with "-v".

Please modify the message so that it makes sense in both cases, and please post screenshots of both cases. Thanks.

@benja-M-1
Copy link
Contributor Author

Hi @ondrejmirtes,

I have updated the message to change whether the option has been set or not.

Here is a screenshot without -v option and with `-v':
image
image

@ondrejmirtes ondrejmirtes merged commit a215b37 into phpstan:master Jan 28, 2022
@ondrejmirtes
Copy link
Member

Perfect, thank you.

@benja-M-1 benja-M-1 deleted the trace-errors-workers branch January 28, 2022 10:00
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.

2 participants