Results of 1 - 1 of about 1 for MyOtherException (0.000 sec.)
- try...catch | PHP 8.3 9414
- try...catch try (PHP 5, PHP 7, PHP 8) try ブロックは、処理が必要な Throwable エラーを throw する可能性があるコードを囲むもので、 対応する catch ブロックあるいは finally ブロックが 必ず ひとつ以上必要です。 try ブロック内で Throwable エラーが
... したい場合に有用です。 例2 処理するクラスを union で指定してキャッチする <?php class MyException extends Exception { } class MyOtherException extends Exception { } class Test { public function testing () { try { throw new MyException (); } catch ( MyException | My ...
-
https://man.mtool.work/php/8.3/control-structures.try-catch.html
PREV
1
NEXT