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){}
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){}