正在显示
1 个修改的文件
包含
6 行增加
和
2 行删除
@@ -81,10 +81,14 @@ class DbPool { | @@ -81,10 +81,14 @@ class DbPool { | ||
81 | $timer = microtime(true); | 81 | $timer = microtime(true); |
82 | } | 82 | } |
83 | 83 | ||
84 | - $query = $this->getClient()->prepare($sql); | ||
85 | 84 | ||
85 | + try { | ||
86 | + $query = $this->getClient()->prepare($sql); | ||
86 | $ret = $query->execute($params); | 87 | $ret = $query->execute($params); |
87 | - | 88 | + }catch (\PDOException $e){ |
89 | + logs($e->getMessage().$e->getTraceAsString()); | ||
90 | + $ret = false; | ||
91 | + } | ||
88 | 92 | ||
89 | 93 | ||
90 | if(APP_DEBUG){ | 94 | if(APP_DEBUG){ |
-
请 注册 或 登录 后发表评论