mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
异常类规范 增加异常类 改进Query类的value和column的缓存冲突问题
This commit is contained in:
@@ -15,6 +15,7 @@ use think\Cache;
|
||||
use think\Db;
|
||||
use think\db\Query;
|
||||
use think\Exception;
|
||||
use think\Exception\ValidateException;
|
||||
use think\Loader;
|
||||
use think\model\Relation;
|
||||
use think\paginator\Collection as PaginatorCollection;
|
||||
@@ -773,7 +774,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
if (!$validate->check($data)) {
|
||||
$this->error = $validate->getError();
|
||||
if ($this->failException) {
|
||||
throw new Exception($this->error);
|
||||
throw new ValidateException($this->error);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user