異常處理的嵌套應該是
try
{
try
{
throw new Exception('異常1');
}
catch (Exception $e1)
{
throw new Exception('異常2');
}
}
catch (Exception $e2)
{
}
try
{
try
{
throw new Exception('異常1');
}
catch (Exception $e1)
{
throw new Exception('異常2');
}
}
catch (Exception $e2)
{
}
2019-05-19
set_error_handler('test'); //使用錯誤處理程序函數 test
restore_error_handler(); //回收錯誤處理程序
restore_error_handler(); //回收錯誤處理程序
2018-05-23