Code Inspection: Wrong catch clauses order
Configure inspections: Settings | Editor | Inspections
Show intention actions: AltEnter
Reports the exceptions that are already caught by a preceding exception and the exceptions that are caught twice.
The catch
clauses must be ordered from more specific to more generic ones. Otherwise, some exceptions may not be caught by the most specific handler.
See Exceptions (php.net) for details.
Place the caret at the highlighted line and press AltEnter or click
.
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.