Ustawia błąd, jaki wystąpił podczas odbierania pliku
@param integer $code
@param string $message
@return \CmsAdmin\Model\PluploadHandler
5878
private function _setError($code, $message = "")
    {
        if (isset(self::$_errors[$code])) {
            $this->_errorCode = $code;
            $this->_errorMessage = self::$_errors[$code];
        } else {
            $this->_errorCode = PLUPLOAD_UNKNOWN_ERR;
            $this->_errorMessage = self::$_errors[PLUPLOAD_UNKNOWN_ERR];
        }
        if ($message) {
            $this->_errorMessage = $message;
        }
        return $this;
    }
180714
public static function success($code = '', $message = '', $errors = [], $extras = [])
    {
        return self::loadResult(self::SUCCESS, $code, $message, $errors, $extras);
    }
448740
protected function respondWithError(
        $message = 'Bad Request',
        $code = SymfonyResponse::HTTP_BAD_REQUEST,
        array $headers = []
    ) {
        return abort($code, $message, $headers);
    }
441155
public function error($message, $code = 1)
    {
        $this->logger->error($message);

        $this->write($message, self::FC_RED);
        $this->write(PHP_EOL);

        return $code;
    }
89810
public static function status(
    /*int*/ $code,
    /*string*/ $message = null
  ) {
    // General header as response.
    $header =
      @intval($code) .
      (!$message ? '' : ' ' . $message);

    // Send status for both CGI and non-CGI web servers.
    header(self::getProtocol() . ' ' . $header);
    header('Status: ' . $header);
  }
1299678
final public function add($code, $message) {

        if ( array_key_exists($code, $this->rpc_errors) ) {

            $this->logger->warning("Cannot add error $code: duplicate entry");

            return false;

        } else {

            $this->rpc_errors[$code] = $message;

            $this->logger->debug("Added error $code");

            return true;

        }

    }
727103
public static function createFromError($message, $code = 0)
    {
        if (!is_numeric($code)) {
            $message = trim("{$code} {$message}");
            $code = -1;
        }

        return new self($message, $code);
    }
632121
public static function halt($message, $code = 404)
    {
        Container::get('response')->setStatus($code);

        if (!Container::get('config')->get('app_debug')) {
            $message = '404 Not Found.';
        }

        if (Container::get('config')->get('app_debug')) {
            $tplPath = null;
        } else {
            $tplPath = Container::get('config')->get('error_tpl');
        }

        if ($tplPath == null || !Helper::isFile(Container::get('config')->get('app_full_path') . '/views/' . $tplPath . '.html')) {
            $tpl = '<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <title>Oops! some error(s) occurred with your application</title>
  <meta name="robots" content="NONE,NOARCHIVE">
  <style type="text/css">
    html * { padding:0; margin:0; }
    body * { padding:10px 20px; }
    body * * { padding:0; }
    body { font-family:Avenir,Helvetica,Arial,sans-serif; -webkit-font-smoothing:antialiased;  -moz-osx-font-smoothing:grayscale;background:#eee; }
    body > div { border-bottom:1px solid #ddd; }
    h1 { font-weight:normal; color:#5d5d5d;}
    h1 span { font-size:60%; color:#666; font-weight:normal; }
    table { border-collapse:collapse; width:100%; }
    td, th { vertical-align:top; padding:2px 3px; }
    th { width:12em; text-align:right; color:#666; padding-right:.5em; }
    #info { background:#f6f6f6; }
    #info p { font-size:16px; margin:5px; color:#5d5d5d; }
    #info strong { font-size:17px; color:#696969; }
    #summary { background:#eee; }
    #explanation { background:#eee; border-bottom: 0px none; }
  </style>
</head>
<body>
  <div id="summary">
    <h1>Oops! some error(s) occurred with your application</span></h1>
  </div>
  <div id="info">
    <p><strong>Request Method: </strong>' . strtoupper($_SERVER['REQUEST_METHOD']) . '</p>
    <p><strong>Request URL: </strong>' . Container::get('request')->getBaseUrl() . ltrim($_SERVER['REQUEST_URI'], '/') . '</p>
      ' . $message . '
  </div>

  <div id="explanation">
    <p>
      You\'re seeing this error because you have <code>app_debug = True</code> in
      your index.php file. Change that to <code>False</code>, and Kotori.php
      will display a standard 404 page.
    </p>
  </div>
</body>
</html>';
        } else {
            $tpl = file_get_contents(Container::get('config')->get('app_full_path') . '/views/' . $tplPath . '.html');
        }

        $tpl = str_replace('{$message}', $message, $tpl);
        $tpl = HtmlCompress::construct()->compress($tpl);
        exit($tpl);
    }
1246697
public function setCode($code) {
        $this->code = trim($code);
        $this->codeLength = strlen($this->code);
        return $this;
    }
273338
protected function status($code, lang_string $message) {
        if (array_key_exists($code, $this->statuses)) {
            throw new coding_exception('Status code already defined');
        }
        $this->statuses[$code] = $message;
    }
1293531
public static function createError(Request $request, $code, $message)
    {
        $errorDetails = $message;

        switch ($code) {
            case 400:
                $errorType = self::ERROR_BAD_REQUEST;
                $errorMessage = 'Parameter is invalid or missing';
                break;
            case 401:
                $errorType = self::ERROR_UNAUTHORIZED;
                $errorMessage = 'The OAuth token was provided but was invalid.';
                break;
            case 403:
                $errorType = self::ERROR_FORBIDDEN;
                $errorMessage = 'Access to the requested resource is forbidden';
                break;
            case 404:
                $errorType = self::ERROR_NOTFOUND;
                $errorMessage = 'Requested resource is not found';
                break;
            case 405:
                $errorType = self::ERROR_METHODNOTALLOWED;
                $errorMessage = 'Attempting to use POST with a GET-only endpoint, or vice-versa';
                break;
            case 406:
                $errorType = self::ERROR_UNACCEPTABLE;
                $errorMessage = 'Request content type is not acceptable';
                break;
            case 422:
                $errorType = self::ERROR_UNPROCESSABLEENTITY;
                $errorMessage = 'Request content is unprocessable';
                break;
            case 500:
                $errorType = self::ERROR_INTERNALSERVERERROR;
                $errorMessage = 'Internal Server Error';
                break;
            case 503:
                $errorType = self::ERROR_MAINTENANCE;
                $errorMessage = 'Server is offline for maintenance, try again soon.';
                break;
            default:
                throw new \InvalidArgumentException('Unable to generate a response.');
        }

        return new static($request, null, $code, $errorType, $errorMessage, $errorDetails);
    }
979231
private function codeToMessage($code) {
        // get the error message belong to the given code
        switch ($code) {
            case \Th\FileDownloader::FILE_WRONG_MIME:
                $message = "File is of the wrong MIME type";
                break;
            case \Th\FileDownloader::FILE_WRONG_EXTENSION:
                $message = "File is of the wrong extension";
                break;
            case \Th\FileDownloader::INVALID_DOWNLOAD_DIR:
                $message = "User set download directory does not exist";
                break;
            default:
                $message = "Unknown download error";
                break;
        }

        // done, return the error message
        return $message;
    }
1355105
public function sendError($code, $message = null)
    {
        if ($this->ajaxOnly === false) {
            output()->setContentType('application/json');
        }

        if (is_array($code)) {
            if (is_numeric(key($code))) {
                $message = reset($code);
                $code = key($code);
            } elseif (isset($code[ 'code' ])) {
                $code = $code[ 'code' ];
                $message = $code[ 'message' ];
            }
        }

        output()->sendError($code, $message);
    }
927542
public static function codeResponse($code,$message)
    {
        $code = intval($code);

        foreach(self::$results as $v) {
            if ($v['message'] == $message && $v['code'] == $code)
                return $v;
        }

        return null;
    }
329629
public function setStatusCode(int $code, string $message = null)
    {
        $this->code = $code;
        $this->message = $message;

        return $this;
    }
585766
protected function applyHandlersToCode($code) {
		foreach($this->codeCallbackHandlers as $callback) {
			call_user_func_array($callback, array(&$code));
		}
		return $code;
	}
723934
public function errorHandler($code, $message, $file = '', $line = '')
    {
        if ($this->error_to_exception) {

            if (ob_get_length() > 0) {
                ob_end_clean(); // Fix templates
            }

            throw new Exception($message);
        }

        $error = array(
            'code' => $code,
            'file' => $file,
            'line' => $line,
            'message' => $message,
            'backtrace' => $this->log_backtrace ? gplcart_backtrace() : array()
        );

        $print = $this->print_error || !$this->isDb();

        if (in_array($code, $this->getFatalErrorTypes())) {

            if ($print) {
                return false; // Let it fall through to the standard PHP error handler
            }

            $this->log('php_shutdown', $error, 'danger', false);
            return true;
        }

        $key = md5(json_encode($error));

        if (isset($this->errors[$key])) {
            return true;
        }

        $this->errors[$key] = $error;

        if ($print) {
            echo $this->getFormattedError($error);
        }

        $this->log('php_error', $error, 'warning', false);
        return true;
    }