Answer the question
In order to leave comments, you need to log in
What's not to like about phpStorm?
On a self-written microframework, I make a classic exception, it works fine, but phpStorm highlights an error:
What does it not like? Throwing an exception via try/catch is something no one in their right mind does. Add @throws \Exception to the description - did it, still swears.
In Laravel, exceptions are made in a similar way - and phpStorm is fine with that.
Answer the question
In order to leave comments, you need to log in
So you threw an exception, and who will catch who?
Storm looks for where you have this exception handler, but can't find it.
php.net/manual/en/function.set-exception-handler.php somewhere globally, at least right in index.php
Ideally, not far from error_reporting.
Add @throws \Exception to the class description - did it, still swears.This is the right decision. Somehow they did it wrong or Storm blunted (in such cases, Ctrl + A => Ctrl + X => Ctrl + V helps).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question