<?php

namespace App\Exception\custom;


use App\Exception\BaseException;


/**
 * Class TestException
 * @package App\Exception\custom
 */
class CodeSpecialException extends BaseException
{

    public function __construct($err, $re_msg="")
    {
        $params = [];

        $code = \Yaconf::get("errorcode.common.code.".$err);
        $msg = $re_msg ?? \Yaconf::get("errorcode.common.msg.".$err);

        if(strlen($code) && strlen($msg)){
            $params = [
                'code' => $code,
                'msg'  => $msg
            ];
        }
        parent::__construct($params);
    }
}