You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try {
// ....
} catch (\Throwable$e) {
// ....
\MyProject\Namespace\MyCustomException::raise($id, $e/*will be injected as previous*/)
}
// src/Exception/MyCustomException.phpnamespaceMyProject\Namespace;
class MyCustomException extends \Exception
{
publicstaticfunctionraise(string$id, \Throwable$previous)
{
thrownewself("something went wrong with #{$id}", 0, $previous);
}
}
This will not be detected and I get this message:
caught "Throwable" must be rethrown. Either catch amore specific exception or add a "throw" clause in the "catch" block to propagate the exception. More info:
Does this rule require the rethrow be explicit or is it just a small bug?
The text was updated successfully, but these errors were encountered:
This will not be detected and I get this message:
caught "Throwable" must be rethrown. Either catch amore specific exception or add a "throw" clause in the "catch" block to propagate the exception. More info:
Does this rule require the rethrow be explicit or is it just a small bug?
The text was updated successfully, but these errors were encountered: