protected function saveException(\Exception $exception)
    {
        if ($this->debug !== true) {
            return;
        }

        $serialised = Serialization::dump(FlattenException::create($exception));

        $sourceFile = str_replace($this->rootPath, '', $exception->getFile());
        $sourceFile = substr($sourceFile, -102);
        $sourceFile = $this->slugifer->slugify($sourceFile);
        $fileName = sprintf('%s-%s.exception', Carbon::now()->format('Ymd-Hmi'), $sourceFile);

        try {
            $this->saveDir->getFile($fileName)->write($serialised);
        } catch (IOException $e) {
            // meh we tried
        }
    }
protected function saveException(\Exception $exception)
    {
        if ($this->debug !== true) {
            return;
        }

        $serialised = Serialization::dump(FlattenException::create($exception));

        $sourceFile = str_replace($this->rootPath, '', $exception->getFile());
        $sourceFile = substr($sourceFile, -102);
        $sourceFile = $this->slugifer->slugify($sourceFile);
        $fileName = sprintf('%s-%s.exception', Carbon::now()->format('Ymd-Hmi'), $sourceFile);

        try {
            $this->saveDir->getFile($fileName)->write($serialised);
        } catch (IOException $e) {
            // meh we tried
        }
    }
protected function saveException ( \ Exception $ exception ) { if ( $ this -> debug !== true ) { return ; } $ serialised = Serialization :: dump ( FlattenException :: create ( $ exception ) ) ; $ sourceFile = str_replace ( $ this -> rootPath , '' , $ exception -> getFile ( ) ) ; $ sourceFile = substr ( $ sourceFile , - 102 ) ; $ sourceFile = $ this -> slugifer -> slugify ( $ sourceFile ) ; $ fileName = sprintf ( '%s-%s.exception' , Carbon :: now ( ) -> format ( 'Ymd-Hmi' ) , $ sourceFile ) ; try { $ this -> saveDir -> getFile ( $ fileName ) -> write ( $ serialised ) ; } catch ( IOException $ e ) { // meh we tried } }
Attempt to save the serialised exception if in debug mode.

@param \Exception $exception
Attempt to save the serialised exception if in debug mode .