2020-03-19 12:32:49 -04:00
|
|
|
# InvalidCatch
|
|
|
|
|
|
|
|
Emitted when trying to catch a class/interface that doesn't extend `Exception` or implement `Throwable`
|
|
|
|
|
|
|
|
```php
|
2020-03-20 19:13:46 -04:00
|
|
|
<?php
|
|
|
|
|
2020-03-19 12:32:49 -04:00
|
|
|
class A {}
|
|
|
|
try {
|
|
|
|
$worked = true;
|
|
|
|
}
|
|
|
|
catch (A $e) {}
|
|
|
|
```
|