php中可以通过extends来自定义异常类
class customException extends Exception
{
}
通过throw new Exception、throw new customException来抛出不同的类,
通过catch()来接受不同的异常类。
catch(Exception $e)可以接受系统类exception和自定义的异常类。
catch(customException $e)只能接受throw抛出的自定义的异常类,不能接受系统类exception