請問一下,調入自定義的錯誤處理方法之后,為何不退出腳本?
//這是自定義錯誤處理方法 public?static?function?throw_exception($errMsg){ ????echo?'<div?style="color:red;">'.$errMsg.'</div>'; } //創建PDO對象部分的代碼 try{ ????self::$link?=?new?PDO($configs['dsn'],$configs['username'],$configs['password'],$configs['params']); }catch(PDOException?$e){ ????//調用自定義異常 ????self::throw_exception($e->getmessage()); } ... ... ...
像這里的話,那么try運行出現問題,然后catch運行這個自定義錯誤處理方法,但是并沒有退出腳本,調用完成之后又會運行catch之后的代碼吧?
2017-02-27
你自己自定義的錯誤方法里并沒有exit呀