php抛出异常

php抛出异常:throw new Exception("xxxxxx!");

实例代码:

1 try{
2 
3 if ($mysqli->connect_errno) {
4   sleep(2);
5   throw new Exception("Connect failed!");
6  }
7 
8 }catch(Exception $e){}

 

posted @ 2014-06-15 16:18  大自然的流风  阅读(3404)  评论(0编辑  收藏  举报