[PHP错误异常]⑩--错误和异常的区别

2017-09-15  本文已影响10人  子木同
<?php

try {
    throw new Exception('测试异常1');
} catch (Exception $e) {
    echo $e->getMessage();
    echo "<hr/>";
    try {
        throw new Exception('测试异常2');
    } catch (Exception $e) {
        echo $e->getMessage();
    }
}
echo "<hr/>continue...";

?>
Paste_Image.png
上一篇 下一篇

猜你喜欢

热点阅读