审查视图

lib/DbException.php 554 字节
邓超 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<?php

namespace Lib;

use Throwable;

/**
 * 数据库 sql语句错误时的异常
 * @author:dc
 * @time 2024/7/24 9:10
 * Class DbException
 * @package Lib
 */
class DbException extends \Exception {


    protected $sql = '';

    protected $bindData = [];

    public function __construct($message = "",$sql='',$bindData=[],$previous = null)
    {
        parent::__construct($message, 0,$previous);
    }


    public function getSql(){
        return $this->sql;
    }

    public function getBindData(){
        return $this->bindData;
    }

}