首页 > Web开发 > 详细

php 语法错误定位 try catch Throwable

时间:2016-06-02 16:28:47      阅读:263      评论:0      收藏:0      [点我收藏+]
try {
  
} catch (Exception $ex) {
     // 计算错误
}  catch (Throwable $ex) {
  // 语法错误,致命错误  
}
 
Throwable {
/* Methods */
abstract public string getMessage ( void )
abstract public int getCode ( void )
abstract public string getFile ( void )
abstract public int getLine ( void )
abstract public array getTrace ( void )
abstract public string getTraceAsString ( void )
abstract public Throwable getPrevious ( void )
abstract public string __toString ( void )
}
 
Throwable  是一个接口,Error 类和Exception 类都继承 Throwable 接口。
Error 就是用于语法错误和致命错误的捕捉的。
 

php 语法错误定位 try catch Throwable

原文:http://www.cnblogs.com/mywebnumber/p/5553379.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!