mirror of
https://github.com/php/php-src.git
synced 2026-10-28 09:46:46 +08:00
[skip ci] docs: Change example to use Throwable (#23430)
This commit is contained in:
1 parent
c96900ee74
commit
33e9057efd
1 file changed
+2
-1
+2
-1
@@ -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";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user