Upload multiple files.

@param       $error
@param array $notices
@param int   $errorCode

@return \Illuminate\Http\JsonResponse
439799
private function errorResponse($error, $notices = [], $errorCode = 400)
    {
        if (is_array($error)) {
            json_encode($error);
        }
        $payload = ['error' => $error];
        if (!empty($notices)) {
            $payload['notices'] = $notices;
        }

        return \Response::json($payload, $errorCode);
    }
249637
private static function errorJson($statusCode, $message)
    {
        $output = ['error' => $statusCode];

        if (!empty($message)) {
            $output['message'] = $message;
        }

        return json_encode($output);
    }
249810
public function error(array $errors): Response
    {
        $this->response->setStatus(500);
        $this->response->setBody(json_encode(['errors' => $errors]));
        return $this->response;
    }
228683
public function addError(ErrorStore $error)
    {
        $this->outputMode = self::MODE_ERROR;
        $this->errors[] = $error;
    }
1237727
public function error($code, $message, $extra = [])
    {
        $response['success'] = false;
        $this->extra($extra);
        if (!in_array($code, array_keys($this->errors))) {
            $code = 500;
        }
        $response['error']['code'] = $code;
        $this->header($this->errors[$code]);
        $response['error']['status'] = $this->errors[$code];
        $response['error']['message'] = $message;
        return $this->output($response);
    }
802194
public function raise_error($code, $message)
    {
        global $__page_content, $ERROR_CODE, $ERROR_MESSAGE;

        $ERROR_CODE    = $code;
        $ERROR_MESSAGE = $message;

        include RCUBE_INSTALL_PATH . 'program/steps/utils/error.inc';
        exit;
    }
1340697
protected function handleError( $errorCode, $errorMessage, $query )
	{
		if( $this->errorLevel )
		{
			$log = new \FS_File_Log_Writer( $this->logFile );
			$log->note( "[".$errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")]" );
			if( $this->errorLevel == 2 )
				trigger_error( $errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")", E_USER_WARNING );
			else if( $this->errorLevel == 3 )
				trigger_error( $errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")", E_USER_ERROR );
			else if( $this->errorLevel == 4 )
				throw new \Exception( $errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")" );
		}
	}
188787
public function addError($errorKey, $errorValue)
    {
        if (!isset($this->errors[$errorKey])) {
            $this->errors[$errorKey] = [];
        }
        $this->errors[$errorKey][] = $errorValue;
    }
216259
public function addCustomErrors($errors)
    {
        if ($errors) {
            foreach ($errors as $error) {
                if (!is_a($error, 'AV\Form\FormError')) {
                    throw new InvalidArgumentException('Custom errors must be AV\Form\FormError objects');
                }
                else {
                    $this->errors[] = $error;
                }
            }
        }

        // Call isValid to update valid status in restore data handlers
        $this->isValid();
    }
1082291
public function sendError($message, $code=500) {
        $this->_error = true;
        $statusHeader= "HTTP/1.1 ".$code." ".$message;
        header($statusHeader);
    }
788501
public function addErrors($messages = [])
	{
		// check if messages are an array
		if(! is_array($messages) && ! $messages instanceof MessageProvider)
		{
			$messages = (array) $messages;
		}

		return $this->errors->merge($this->resolveErrorKey($messages));
	}
365952
private function execute(array $files, $errorMessage)
    {
        $outputMessage = new PreCommitOutputWriter(self::RUNNING_PHPLINT);
        $this->output->write($outputMessage->getMessage());

        $errors = [];
        foreach ($files as $file) {
            $errors[] = $this->phpLintTool->process($file);
        }

        $errors = array_filter($errors);

        if (!empty($errors)) {
            $this->output->writeln($outputMessage->getFailMessage());
            $this->output->writeln($outputMessage->setError(implode('', $errors)));
            $this->output->writeln(BadJobLogoResponse::paint($errorMessage));

            throw new PhpLintViolationsException();
        }

        $this->output->writeln($outputMessage->getSuccessfulMessage());
    }
269426
public function error( $message, $code = null, $data = null )
    {
        if ( null === $code && isset( $this->errorCodes[$message] ) )
        {
            $code = $this->errorCodes[$message];
        }

        return $this->getResponse( 'error', (object) array(
            'code'      => $code,
            'message'   => $message,
            'data'      => $data,
        ) );
    }
197053
private function addError($errorCode, $valid = true)
    {
        $this->isValid = $valid;
        $this->errors[] = $errorCode;

        return $this;
    }
1347159
protected function _respondToError($errorMessage, $httpCode) {
        $this->_setHttpStatusCode($httpCode);
        $this->view->result = array(
            'success' => false,
            'errorMessage' => $errorMessage
        );
    }
402021
protected static function getUploadFilesRecursive($key, $names, $errors)
    {
        if (is_array($names)) {
            foreach ($names as $i => $name) {
                static::getUploadFilesRecursive($key . '[' . $i . ']', $name, $errors);
            }
        } elseif ($errors !== UPLOAD_ERR_NO_FILE) {
            self::$_files[] = $key;
        }
    }
170502
protected static function createErrorReply(
        ContextInterface $context,
        $errorValue,
        int $errorCode,
        string $messageTemplate,
        array $messageParams
    ): array {
        return BlockReplies::createErrorReply($context, $errorValue, $errorCode, $messageTemplate, $messageParams);
    }