protected function catchHaltedMiddleware(bool $setting = null)
    {
        if ($setting === null) {
            return $this->catchHaltExceptions;
        }
        $this->catchHaltExceptions = $setting;
        return $this;
    }