Returns an error message indicating why the match failed, and the
negation of the message if $negated is true.

@param  boolean $negated Whether or not to print the negated message
@return string  The error message
345564
public function getFailureMessage($negated = false)
    {
        $x = $this->start;
        $y = $this->end;

        if (!$negated) {
            return "Expected {$this->actual} to be within [$x, $y]";
        } else {
            return "Expected {$this->actual} not to be within [$x, $y]";
        }
    }
1059009
public function errorInfo(): string
    {
        $errorInfo = $this->statement->errorInfo();
        return !isset($errorInfo[0]) || 0 == $errorInfo[0] ? '' : implode(' ', $errorInfo);
    }
279021
public function getFailureMessage($negated = false)
    {
        $explanation = 'none thrown';
        if ($this->thrown) {
            $class = get_class($this->thrown);
            $explanation = "got $class";
        }

        if (!$negated) {
            return "Expected {$this->expected} to be thrown, {$explanation}";
        } else {
            return "Expected {$this->expected} not to be thrown";
        }
    }
138489
public static function getErrorStr($errors){
		$str = '';
		if(is_array($errors)){
			foreach($errors as $field=>$error_k){
				$str .= $field.':'.implode(",",$error_k)." <br/>";
			}
		}
		return $str;
	}
86457
private function errorMessage()
    {


        if ($this->preparedExec == false){
    		$info = $this->dbConnector->errorInfo();
    	}
    	else{
    		$info = $this->lastPreparedExecStatement->errorInfo();
    	}
    	
    	if (!empty($info[2])){
    		$returnValue = $info[2];
    	}
    	else if (!empty($info[1])){
            $returnValue = 'Driver error: ' . $info[1];
    	}
    	else if (!empty($info[0])){
    		$returnValue = 'SQLSTATE: ' . $info[0];
    	}
        else{
            $returnValue = 'No error message to display.';
        }

        return (string) $returnValue;
    }
399962
public function getErrors($clear = true)
    {
        $out = $this->_errors;
        if($clear) {
            $this->clearErrors();
        }
        return $out;
    }
1171308
public static function error($msg)
    {
        $msg = 'Error: ' . $msg;
        $space = strlen($msg) + 4;
        $out  = static::colorize(str_pad(' ', $space), Color::FG_WHITE, Color::AT_BOLD, Color::BG_RED) . PHP_EOL;
        $out .= static::colorize('  ' . $msg . '  ', Color::FG_WHITE, Color::AT_BOLD, Color::BG_RED) . PHP_EOL;
        $out .= static::colorize(str_pad(' ', $space), Color::FG_WHITE, Color::AT_BOLD, Color::BG_RED) . PHP_EOL;

        return $out;
    }
297251
public function Check($value)
    {
        if (!\in_array($value, $this->values))
            $this->error = self::NotInArray;
        
        return $this->error == '';
    }
879295
protected function getErrorMessage(array $errors)
    {
        $error_message = '';
        foreach ($errors as $error) {
            $error_message .= $this->parseError($error) . PHP_EOL . PHP_EOL;
        }

        return $error_message;
    }
106216
public function getError() : ?string 
    {
        if ( ! $this->hasError()) {
            $this->setError($this->getDefaultError());
        }
        return $this->error;
    }
727064
public function error($errors = false)
    {
        if ($errors === false) {
            return $this->error;
        } else {
            if (is_array($errors) === true) {
                foreach ($erros as $error) {
                    $this->error($error);
                }
            }
        }
        $this->error[] =(string) $errors;
    }
615405
protected function assertSee($text, $message, $negate = false)
    {
        try {
            $text = preg_quote($text, '/');
            $method = $negate ? 'assertNotRegExp' : 'assertRegExp';

            $this->$method("/{$text}/i", $this->response(), $message);
        } catch (PHPUnitException $e) {
            $this->logLatestContent();

            throw $e;
        }

        return $this;
    }
342714
private function getErrorMessage()
    {
        $directivesMessage = '';
        $domainsMessage = '';

        if (!empty($this->invalidValues['directives'])) {
            $directivesMessage = "The following directives are invalid:\n- ";
            $directivesMessage .= implode("\n- ", $this->invalidValues['directives']);
        }

        if (!empty($this->invalidValues['domain'])) {
            $domainsMessage = "The following domains are invalid:\n- ";
            $domainsMessage .= implode("\n- ", $this->invalidValues['domain']);
        }

        return $domainsMessage . "\n" . $directivesMessage;
    }
53186
public function convertFromNegative($input)
    {
        if (strpos('/*', $input[0]) !== false) {
            $input = substr($input, 1);
        }

        $input = strtr($input, static::NEGATIVE_CHARS, static::POSITIVE_CHARS);

        $res = $this->convertFromPositive($input);

        if (preg_match('/^0+$/', $res)) {
            return $res;
        }

        return '-' . $res;
    }
777012
public function getErrorReport()
    {
        if (empty($this->errors)) {
            return '';
        }
        $r = "Some arguments did not pass validation:\n";
        foreach ($this->errors as $letter => $arr) {
            $r .= "  $letter : " . implode(', ', $arr) . "\n";
        }
        $r .= "\n";

        return $r;
    }
876564
protected function get_error()
    {
        $query = $this->database->getQueryCollection()->findQuery($this->strQuery);

        if ($query) {
            return $query->error();
        }

        return '';
    }
391337
public function getErrorMessage(int $error): string
    {
        switch ($error) {
            case CURLE_UNSUPPORTED_PROTOCOL:
                return 'Unsupported protocol';
            case CURLE_FAILED_INIT:
                return 'Internal cUrl error?';
            case CURLE_URL_MALFORMAT:
                return 'Malformed URL';
            case CURLE_COULDNT_RESOLVE_PROXY:
                return "Couldn't resolve proxy";
            case CURLE_COULDNT_RESOLVE_HOST:
                return "Couldn't resolve host";
            case CURLE_COULDNT_CONNECT:
                return "Couldn't connect to host, Elasticsearch down?";
            case CURLE_OPERATION_TIMEOUTED:
                return 'Operation timed out';
        }

        return 'Unknown error:'.$error;
    }