异常类规范 增加异常类 改进Query类的value和column的缓存冲突问题

This commit is contained in:
thinkphp
2016-06-12 16:35:42 +08:00
parent 659900ab91
commit b10635e22e
33 changed files with 236 additions and 79 deletions

View File

@@ -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;
}