DbException.php 554 字节
<?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;
    }

}