public function record(Exception $e)
    {
        if ($this->shouldntHandle($e)) {
            return false;
        }

        $opts = [
            'class'       => get_class($e),
            'file'        => $e->getFile(),
            'line'        => $e->getLine(),
            'code'        => (is_int($e->getCode()) ? $e->getCode() : 0),
            'message'     => $e->getMessage(),
            'trace'       => $e->getTraceAsString(),
        ];

        $configDependant = array_keys($this->config['collect']);

        foreach ($configDependant as $key) {
            if ($this->canCollect($key)) {
                $value = $this->collect($key, $e);
                if ($value !== null) {
                    $opts[$key] = $value;
                }
            }
        }

        $class = config('lern.recorder.model');
        $class = !empty($class) ? $class : ExceptionModel::class;

        $model = new $class();
        foreach($opts as $key => $value) {
            $model->{$key} = $value;
        }

        $model->save();

        Cache::forever($this->getCacheKey($e), Carbon::now());

        return $model;
    }