mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Connection类
This commit is contained in:
@@ -386,7 +386,7 @@ abstract class Connection
|
|||||||
return $this->close()->query($sql, $bind, $master, $pdo);
|
return $this->close()->query($sql, $bind, $master, $pdo);
|
||||||
}
|
}
|
||||||
throw new PDOException($e, $this->config, $this->getLastsql());
|
throw new PDOException($e, $this->config, $this->getLastsql());
|
||||||
} catch (\ErrorException $e) {
|
} catch (\Exception $e) {
|
||||||
if ($this->isBreak($e)) {
|
if ($this->isBreak($e)) {
|
||||||
return $this->close()->query($sql, $bind, $master, $pdo);
|
return $this->close()->query($sql, $bind, $master, $pdo);
|
||||||
}
|
}
|
||||||
@@ -449,7 +449,7 @@ abstract class Connection
|
|||||||
return $this->close()->execute($sql, $bind);
|
return $this->close()->execute($sql, $bind);
|
||||||
}
|
}
|
||||||
throw new PDOException($e, $this->config, $this->getLastsql());
|
throw new PDOException($e, $this->config, $this->getLastsql());
|
||||||
} catch (\ErrorException $e) {
|
} catch (\Exception $e) {
|
||||||
if ($this->isBreak($e)) {
|
if ($this->isBreak($e)) {
|
||||||
return $this->close()->execute($sql, $bind);
|
return $this->close()->execute($sql, $bind);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user