第6讲面向对象II.pptVIP

  • 1
  • 0
  • 约7千字
  • 约 35页
  • 2017-11-17 发布于河南
  • 举报
第6讲面向对象II

6.6.3 异常 –综合示例 abstract class CustomException extends Exception implements IException { protected $message=Unknown exception; private $string; protected $code=0; protected $file; protected $line; private $trace; 6.6.3 异常 –综合示例 public function __construct($message=null,$code=0) { if(!$message) { throw new $this(Unknown-----.get_class($this)); } parent::__construct($message,$code); } public function __toString() { return get_class($this).{$this-message in {$this-file}({$this-line})br.{$this-getTraceAsString()}; } } 6.6.3 异常 –综合示例 class Test

文档评论(0)

1亿VIP精品文档

相关文档