BindParamException.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn>
  10. // +----------------------------------------------------------------------
  11. namespace think\db\exception;
  12. use think\exception\DbException;
  13. /**
  14. * PDO参数绑定异常
  15. */
  16. class BindParamException extends DbException
  17. {
  18. /**
  19. * BindParamException constructor.
  20. * @access public
  21. * @param string $message
  22. * @param array $config
  23. * @param string $sql
  24. * @param array $bind
  25. * @param int $code
  26. */
  27. public function __construct($message, $config, $sql, $bind, $code = 10502)
  28. {
  29. $this->setData('Bind Param', $bind);
  30. parent::__construct($message, $config, $sql, $code);
  31. }
  32. }