<?php
//Throwables
//ParseError

try {
    include 'config.php';
} catch (\ParseError $e) {
    echo 'ParseError handling';
    echo '<br/>';
}

class Address {
    private $customer;
    public function __construct(Customer $customer) {
        $this->customer = $customer;
    }
}

$customer = new stdClass();

try {
    $address = new Address($customer);
} catch (\Throwable $t) {
    echo 'Throwable handling';
    echo '<br/>';
} finally {
    echo 'cleanup';
    echo '<br/>';
}

?>

输出

ParseError handling
Throwable handling
cleanup

最新文章

  1. sql例子
  2. virtualenv中ImportError: No module named django
  3. select()
  4. 为什么删不掉date模块
  5. USACO3.23Spinning Wheels
  6. ubuntu 12.04 编译安装 nginx
  7. iOS ui界面vtf 开发
  8. iOS 删除黑色边框线导航栏&amp;amp;删除搜索框的阴影边界线和中黑色文本输入框 - 解
  9. 201521123116 《java程序设计》第十二周学习总结
  10. 学习笔记TF056:TensorFlow MNIST,数据集、分类、可视化
  11. (转)30 个实例详解 TOP 命令
  12. Oracle EBS OPM 事务处理
  13. Git Pull Failed: cannot lock ref &#39;refs/remotes/origin/xxxxxxxx&#39;: unable to resolve ref
  14. python之模块chunk,了解即可
  15. 开发者如何更好的选择和适应NoSQL的5个阶段
  16. Python入门之logging日志模块以及多进程日志
  17. http post发送请求
  18. 在Powerdesigner中创建概念数据模型
  19. 《解读window核心编程》 之 字符和字符串处理方式
  20. HighCharts常用设置

热门文章

  1. ASP.NET Core使用Docker-Compose实现多容器应用部署
  2. QuantLib 金融计算——收益率曲线之构建曲线(4)
  3. 实现一个特殊的栈,要求push,poll , getMin方法时间复杂度都是O(N)
  4. golang面对对象
  5. CSP2019退役记
  6. SQL系列(十一)—— 函数(function)
  7. webUI框架miniUI,easyUI,extJS,Bootstrap简介及简单部署
  8. 【mysql】获取某个表所有列名【mybatis】
  9. (8)ASP.NET Core 中的MVC路由一
  10. RabbitMQ学习之Routing(4)