The problem of developing exception layer with tp5.1 Interface

use thinkphp5.1x for interface development and do a global exception handling layer.

class ExceptionHandler extends Handle {
    private $code;
    private $msg;
    private $errCode;
    public function render(\Exception $e)
    {
        if($e instanceof BaseException){
        //    
            $this->code=$e->code;
            $this->msg=$e->msg;
            $this->errCode=$e->errCode;
        }else{
        // ,:,tp5,
            if(config("app.app_debug")){
                //
                parent::render();
            }else{
                $this->code=500;
                $this->msg="";
                $this->errCode=999;
                //
            }
        }

I entered an incorrect route: a fatal error

was displayed.

Why no exception was caught, and how do I modify my code?


resolved
return parent::render ($e);
above does not pass parameters in

Menu