PHP异常学习练习
2012-03-13 11:39
288 查看
<?php class Exception_1 extends Exception { private $error; public function __construct($error) { return $this->error=$error; } } class Exception_2 extends Exception { private $error; public function __construct($error) { return $this->error=$error; } } class Test_throw { public function __construct() { // throw new Exception_1(“error-1″); throw new Exception_2(“error-2″); // throw new Exception(“error-0″); } } try{ $test=new Test_throw; }catch(Exception_1 [...]
相关文章推荐
- PHP异常最简洁最直接的学习案例
- PHp学习之路二(数组练习)
- [php学习十]javaScript的基本练习
- 韩顺平_php从入门到精通_视频教程_第4讲_图像_表格_实际应用-菜谱_课堂练习-课程表_学习笔记_源代码图解_PPT文档整理
- [php学习二]基本语法练习二
- PHp学习之路二(数组练习)
- [php学习六]AJAX练习3-实时搜索
- PHP学习笔记十四之异常(进阶篇)
- [php学习三]表单提交练习
- [php学习七]html的head练习
- [php学习十六]JQuery练习1-选择器
- [php学习十七]JQuery练习2-动画
- [php学习十三]javaScript的基本练习4-与php的相互调用
- PHP菜鸟学习之路-php学习笔记变量与运算符练习
- php 学习try_catch测试抛出异常
- Java学习之异常练习
- JAVA学习日志(9-3-异常练习)
- python学习第十章文件和异常部分课后练习自己尝试的代码
- PHP 学习笔记(四):高级教程:Cookies,Sessions,邮件,错误处理,异常处理,过滤器
- [php学习四]AJAX练习1