lint/complexity/require-previous-exception
In the code-quality set. Safe fix.
What it does
When throwing into a catch block, checks that the previous exception is passed to the new throw clause
Configuration
[lint.rules]
"complexity/require-previous-exception" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
ThrowWithPreviousException(rector)