dsuikgi9199 2015-03-10 12:19
浏览 11
已采纳

在Uncaught Exception之后重启代码?

I'm not very smooth with PHP, because I'm only using it temporary. The nature of my code is very simple, and it does have a few cases where it comes to a "uncaught exception: exit".

How exactly can I use the exception handler to tell it restart the code when it gets this error?

  • 写回答

1条回答 默认 最新

  • duanbi3786 2015-03-10 12:24
    关注

    See: http://php.net/manual/en/language.exceptions.php

    Use try-catch statement:

    try {
        //your code here
    } catch (Exception e) {
       // do something if an exception is thrown.
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统