Skip to content

Is non-string exception codes supported? #7846

Answered by orklah
andrew-demb asked this question in Q&A
Discussion options

You must be logged in to vote

It is indeed intended. There were a lot of discussions about this and specifically about your case here because there is no good solution for every case. The current compromise is already pretty complex but it covers a lot of use cases and is consistent with the behaviour in PHPStan so I don't think we'll change this in the core

If it's really important for you, there may be a way to make a plugin or a stub in order to change Psalm's behaviour, but I wouldn't recommend it

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@andrew-demb
Comment options

Answer selected by andrew-demb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants