public function getMessage()
    {
        switch ($this->code) {
            case self::LOAD_FAILED:
                return $this->extraDetails;
            case self::SCHEMA_VIOLATION:
                return $this->extraDetails;
            case self::FIELD_VALIDATION:
                $field = $this->extraDetails['field'];
                $error = $this->extraDetails['error'];
                $value = json_encode($this->extraDetails['value']);

                return "{$field}: {$error} ({$value})";
            case self::ROW_FIELD_VALIDATION:
                $row = $this->extraDetails['row'];
                $field = $this->extraDetails['field'];
                $error = $this->extraDetails['error'];
                $value = $this->extraDetails['value'];

                return "row {$row} {$field}: {$error} ({$value})";
            case self::ROW_VALIDATION:
                $row = $this->extraDetails['row'];
                $error = $this->extraDetails['error'];

                return "row {$row}: {$error}";
            default:
                throw new \Exception("Invalid schema validation code: {$this->code}");
        }
    }
public function getMessage()
    {
        switch ($this->code) {
            case self::LOAD_FAILED:
                return $this->extraDetails;
            case self::SCHEMA_VIOLATION:
                return $this->extraDetails;
            case self::FIELD_VALIDATION:
                $field = $this->extraDetails['field'];
                $error = $this->extraDetails['error'];
                $value = json_encode($this->extraDetails['value']);

                return "{$field}: {$error} ({$value})";
            case self::ROW_FIELD_VALIDATION:
                $row = $this->extraDetails['row'];
                $field = $this->extraDetails['field'];
                $error = $this->extraDetails['error'];
                $value = $this->extraDetails['value'];

                return "row {$row} {$field}: {$error} ({$value})";
            case self::ROW_VALIDATION:
                $row = $this->extraDetails['row'];
                $error = $this->extraDetails['error'];

                return "row {$row}: {$error}";
            default:
                throw new \Exception("Invalid schema validation code: {$this->code}");
        }
    }
public function getMessage ( ) { switch ( $ this -> code ) { case self :: LOAD_FAILED : return $ this -> extraDetails ; case self :: SCHEMA_VIOLATION : return $ this -> extraDetails ; case self :: FIELD_VALIDATION : $ field = $ this -> extraDetails [ 'field' ] ; $ error = $ this -> extraDetails [ 'error' ] ; $ value = json_encode ( $ this -> extraDetails [ 'value' ] ) ; return "{$field}: {$error} ({$value})" ; case self :: ROW_FIELD_VALIDATION : $ row = $ this -> extraDetails [ 'row' ] ; $ field = $ this -> extraDetails [ 'field' ] ; $ error = $ this -> extraDetails [ 'error' ] ; $ value = $ this -> extraDetails [ 'value' ] ; return "row {$row} {$field}: {$error} ({$value})" ; case self :: ROW_VALIDATION : $ row = $ this -> extraDetails [ 'row' ] ; $ error = $ this -> extraDetails [ 'error' ] ; return "row {$row}: {$error}" ; default : throw new \ Exception ( "Invalid schema validation code: {$this->code}" ) ; } }
returns a string representation of the error.

@return string

@throws \Exception
returns a string representation of the error .