[skip ci] docs: Change example to use Throwable (#23430)

This commit is contained in:
NickSdot authored and GitHub committed 2026-08-24 09:53:07 +02:00
1 parent c96900ee74
commit 33e9057efd
1 file changed
+2 -1
+2 -1
View File
@@ -300,7 +300,8 @@ rewritten to comply with these rules.
```diff
try {
throw new ValueError('foo');
} catch (ValueError $e) {
- } catch (ValueError $e) {
+ } catch (Throwable $e) {
- echo $e->getMessage(), "\n";
+ echo $e::class, ': ', $e->getMessage(), "\n";
}