protected function causedByLostConnection(Throwable $e)
    {
        if (parent::causedByLostConnection($e)) {
            return true;
        }

        $lostConnectionErrors = [
            'ORA-03113',    //End-of-file on communication channel
            'ORA-03114',    //Not Connected to Oracle
            'ORA-03135',    //Connection lost contact
            'ORA-12170',    //Connect timeout occurred
            'ORA-12537',    //Connection closed
            'ORA-27146',    //Post/wait initialization failed
            'ORA-25408',    //Can not safely replay call
            'ORA-56600',    //Illegal Call
        ];

        $additionalErrors = null;

        $options = isset($this->config['options']) ? $this->config['options'] : [];
        if (array_key_exists(static::RECONNECT_ERRORS, $options)) {
            $additionalErrors = $this->config['options'][static::RECONNECT_ERRORS];
        }

        if (is_array($additionalErrors)) {
            $lostConnectionErrors = array_merge($lostConnectionErrors,
                $this->config['options'][static::RECONNECT_ERRORS]);
        }

        return Str::contains($e->getMessage(), $lostConnectionErrors);
    }
protected function causedByLostConnection(Throwable $e)
    {
        if (parent::causedByLostConnection($e)) {
            return true;
        }

        $lostConnectionErrors = [
            'ORA-03113',    //End-of-file on communication channel
            'ORA-03114',    //Not Connected to Oracle
            'ORA-03135',    //Connection lost contact
            'ORA-12170',    //Connect timeout occurred
            'ORA-12537',    //Connection closed
            'ORA-27146',    //Post/wait initialization failed
            'ORA-25408',    //Can not safely replay call
            'ORA-56600',    //Illegal Call
        ];

        $additionalErrors = null;

        $options = isset($this->config['options']) ? $this->config['options'] : [];
        if (array_key_exists(static::RECONNECT_ERRORS, $options)) {
            $additionalErrors = $this->config['options'][static::RECONNECT_ERRORS];
        }

        if (is_array($additionalErrors)) {
            $lostConnectionErrors = array_merge($lostConnectionErrors,
                $this->config['options'][static::RECONNECT_ERRORS]);
        }

        return Str::contains($e->getMessage(), $lostConnectionErrors);
    }
protected function causedByLostConnection ( Throwable $ e ) { if ( parent :: causedByLostConnection ( $ e ) ) { return true ; } $ lostConnectionErrors = [ 'ORA-03113' , //End-of-file on communication channel 'ORA-03114' , //Not Connected to Oracle 'ORA-03135' , //Connection lost contact 'ORA-12170' , //Connect timeout occurred 'ORA-12537' , //Connection closed 'ORA-27146' , //Post/wait initialization failed 'ORA-25408' , //Can not safely replay call 'ORA-56600' , //Illegal Call ] ; $ additionalErrors = null ; $ options = isset ( $ this -> config [ 'options' ] ) ? $ this -> config [ 'options' ] : [ ] ; if ( array_key_exists ( static :: RECONNECT_ERRORS , $ options ) ) { $ additionalErrors = $ this -> config [ 'options' ] [ static :: RECONNECT_ERRORS ] ; } if ( is_array ( $ additionalErrors ) ) { $ lostConnectionErrors = array_merge ( $ lostConnectionErrors , $ this -> config [ 'options' ] [ static :: RECONNECT_ERRORS ] ) ; } return Str :: contains ( $ e -> getMessage ( ) , $ lostConnectionErrors ) ; }
Determine if the given exception was caused by a lost connection.

@param  \Exception  $e
@return bool
Determine if the given exception was caused by a lost connection .