码迷,mamicode.com
首页 > Web开发 > 详细

php 语法错误定位 try catch Throwable

时间:2016-06-02 16:31:43      阅读:311      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!