Bolt\Controller\Exception::saveException PHP Метод

saveException() защищенный Метод

Attempt to save the serialised exception if in debug mode.
protected saveException ( Exception $exception )
$exception Exception
    protected function saveException(\Exception $exception)
    {
        if ($this->app['debug'] !== true) {
            return;
        }
        $environment = $this->app['environment'];
        $serialised = serialize(FlattenException::create($exception));
        $sourceFile = Slugify::create()->slugify($exception->getFile());
        $fileName = sprintf('%s-%s.exception', Carbon::now()->format('Ymd-Hmi'), substr($sourceFile, -102));
        $fullPath = sprintf('%s/exception/%s', $environment, $fileName);
        $cacheFilesystem = $this->app['filesystem']->getFilesystem('cache');
        $file = new File($cacheFilesystem, $fullPath);
        $file->write($serialised);
    }