Retrieve the description of the error associated with the uploaded file.

If the file was uploaded successfully, this method returns null.

This method is not part of PSR-7.

@return string|null
199264
public function getErrorDescription()
    {
        if ($this->error === UPLOAD_ERR_OK) {
            return null;
        }
        
        $descs = static::ERROR_DESCRIPTIONS;
        return isset($descs[$this->error]) ? $descs[$this->error] : $descs[-1];
    }
1361616
public function tell()
	{
		if (!$this->fh)
		{
			throw new \RuntimeException('File not open');
		}

		// Capture PHP errors
		$php_errormsg = '';
		$track_errors = ini_get('track_errors');
		ini_set('track_errors', true);

		switch ($this->processingmethod)
		{
			case 'gz':
				$res = gztell($this->fh);
				break;

			case 'bz':
			case 'f':
			default:
				$res = ftell($this->fh);
				break;
		}

		// May return 0 so check if it's really false
		if ($res === false)
		{
			throw new \RuntimeException($php_errormsg);
		}

		// Restore error tracking to what it was before
		ini_set('track_errors', $track_errors);

		// Return the result
		return $res;
	}
897693
public String getDescription() {
        if (description != null) {
            return description;
        }
        if (UNKNOWN_ERROR.equals(getCode())) {
            return String.format("Received error with code %s", getCode());
        }
        return "Failed with unknown error";
    }
682838
private function getErrorMessage()
    {
        $message = $this->target->resource->timeoutMessage;

        return sprintf(
            $message,
            $this->url,
            $this->totalTime,
            $this->getRoundtripTimeout()
        );
    }
695640
public function getMessage()
    {
        $message = null;

        if (isset($this->data->transactionResponse->messages)) {
            // In case of a successful transaction, a "messages" element is present
            $message = (string)$this->data->transactionResponse->messages->message->description;
        } elseif (isset($this->data->transactionResponse->errors)) {
            // In case of an unsuccessful transaction, an "errors" element is present
            $message = (string)$this->data->transactionResponse->errors->error->errorText;
        } elseif (isset($this->data->messages->message)) {
            // In case of invalid request, the top-level message provides details.
            $message = (string)$this->data->messages->message->text;
        }

        return $message;
    }
7720
public function getErrorMessage($code = null)
    {
        $code = $code ?: $this->$code;

        static $errors = [
            UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d kb).',
            UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.',
            UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.',
            UPLOAD_ERR_NO_FILE => 'No file was uploaded.',
            UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.',
            UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.',
            UPLOAD_ERR_EXTENSION => 'File upload was stopped by a php extension.',
        ];

        $max_file_size = $code === UPLOAD_ERR_INI_SIZE ? self::getMaxFilesize() / 1024 : 0;
        $message = isset($errors[$code]) ? $errors[$code] : 'The file "%s" was not uploaded due to an unknown error.';

        return sprintf($message, $this->getClientOriginalName(), $max_file_size);
    }
1200920
public static function _uploadError ($error)
	{
		
		// Return an error dependent on the error number
		
		switch ($error)
		{
			
			case UPLOAD_ERR_INI_SIZE:
				
				return 'The filesize cannot be more than ' . ini_get ('post_max_size');
				break;
				
			case UPLOAD_ERR_FORM_SIZE:
				
				return 'The filesize cannot be more than ' . $_POST['MAX_FILE_SIZE'];
				break;
				
			case UPLOAD_ERR_PARTIAL:
				
				return 'The file was only partially uploaded. Please try again.';
				break;
				
			case UPLOAD_ERR_NO_FILE:
				
				return 'No file was selected to upload!';
				break;
				
			case UPLOAD_ERR_NO_TMP_DIR:
				
				return 'There is no temporary folder to upload the file to. Please inform the site administrator.';
				break;
				
			case UPLOAD_ERR_CANT_WRITE:
				
				return 'Failed to write the file to disk.';
				break;
				
			default:
				
				return 'Unknown error.';
				break;
				
		}
		
	}
376485
public function getErrorMessage() {
        if($this->errorMessage) {
            return $this->errorMessage;
        }

        return sprintf(self::$defaultErrorMessagePattern, $this->getName());
    }
393136
public function getError()
    {
        if (count($this->errors) > 1) {
            trigger_error("There are multiple errors, returning only the first", E_USER_NOTICE);
        }
        
        return reset($this->errors) ?: null;
    }
429994
public function getError()
	{
		if($this->lastStmt)
		{
			$errorInfo = $this->lastStmt->errorInfo();
		}
		else
		{
			$errorInfo = $this->handler->errorInfo();
		}
		return implode(' ',$errorInfo);
	}
1080696
public function getErrorsAsString()
    {
        $string = '';
        foreach ($this->getErrors() as $error) {
            $string .= sprintf(
                "%s: %s",
                $error['field'],
                $error['message']
            );
            if (isset($error['rejected'])) {
                $string .= sprintf(" ('%s' given)", $error['rejected']);
            }
            $string .= ";\n";
        }

        return trim($string);
    }
1049581
public function getError() {
        if ($this->error) {
            return $this->translate($this->error);
        }
        if ($this->form->model && is_object($this->form->model) && $this->form->model->hasErrors($this->name)) {
            $errors = $this->form->model->getErrors($this->name);
            foreach ($errors as &$message) {
                $message = $this->translate($message);
            }
            return $errors;
        }
        return null;
    }
11025
function get_error()
    {
        $err = $this->error;

        // check ldap connection for errors
        if (!$err && $this->ldap->get_error()) {
            $err = array(self::ERROR_SEARCH, $this->ldap->get_error());
        }

        return $err;
    }
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;
    }
880419
public function get_last_error() {
        $error = false;
        // First look for any previously saved stmt error
        if (!empty($this->last_stmt_error)) {
            $error = $this->last_stmt_error;
            $this->last_stmt_error = null;
        } else { // Now try connection error
            $e = oci_error($this->oci);
            if ($e !== false) {
                $error = $e['message'];
            }
        }
        return $error;
    }
876564
protected function get_error()
    {
        $query = $this->database->getQueryCollection()->findQuery($this->strQuery);

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

        return '';
    }
419587
public function errors()
    {
        if (isset($this->data) && isset($this->data["error_description"])) {
            return $this->data["error_description"];
        }
        return null;
    }