Skip to content

Commit

Permalink
模型增加getError方法
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Jan 18, 2018
1 parent a81bc1b commit aaae036
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions library/think/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
*/
protected $queryInstance;

/**
* 错误信息
* @var mixed
*/
protected $error;

/**
* 架构函数
* @access public
Expand Down Expand Up @@ -867,6 +873,16 @@ public static function destroy($data)
return $count;
}

/**
* 获取错误信息
* @access public
* @return mixed
*/
public function getError()
{
return $this->error;
}

/**
* 解序列化后处理
*/
Expand Down

0 comments on commit aaae036

Please sign in to comment.