Store or delete an ActionError for the specified key.

@param  string $key     - error key
@param  string $message - error message; if NULL the error for the specified key is deleted
775363
public function setActionError($key, $message) {
        if (!isset($message)) {
            unset($this->attributes[ACTION_ERRORS_KEY][$key]);
        }
        elseif (is_string($message)) {
            $this->attributes[ACTION_ERRORS_KEY][$key] = $message;
        }
        else throw new IllegalTypeException('Illegal type of parameter $message: '.gettype($message));
    }
955701
private function check(string $method, $key, string $message = null, callable $check)
    {
        if (is_array($key)) {
            foreach ($key as $name) {
                $this->$method($name, $message);
            }
        } else {
            if (isset($this->scope[$key]) && ! $check($key)) {
                $this->errors[$key] = sprintf($message !== null ? $message : self::${$method . 'Message'}, $key);
            }
        }

        return $this;
    }
150198
public function deleteMessage($key) {
		if(isset($this->msg[$key])) {
			unset($this->msg[$key]);
		}
		if(!$this->msg) {
			$this->deleteFile();
		}
	}
1236576
public function overwrite($key, $message=null)
    {
        if (!is_array($key)) {
            $this->overwrites[$key] = $message;
            return $this;
        }

        foreach ($key as $k=>$v) {
            $this->overwrite($k, $v);
        }

        return $this;
    }
194653
public function setError(?string $message = null) : void
    {
        $this->is_valid = false;
        $this->error = (null === $message) ? $this->default_error : $message;
    }
771258
public function error($message, array $context = [])
    {
        if ($message instanceof \Throwable) {
            $m = "[{$message->getCode()}] " . $message->getMessage();
            $m .= "\n";
            $m .= $message->getTraceAsString();
            $this->error($m, $context); // calling back this method with string argument
            return;
        }

        $this->log(LogLevel::ERROR, $message, $context);
    }
226794
public function error($message, array $context = []) : void
    {
        /** @psalm-suppress UndefinedClass */
        SspLogger::error($message.($context ? " ".var_export($context, true) : ""));
    }
1026847
public function error($message = '', $context = [], $role = 'system', $times = 0, $ttl = 0)
    {
        if ($this->isSingle()) {
            $this->log($message, $context, Logger::ERROR, $role, $times, $ttl);
        }
    }
1204258
public function addError(string $key, string $message, string $group = null): self
    {
        if (!empty($group)) {
            $this->errors[$group][$key][] = $message;
        } else {
            $this->errors[$key][] = $message;
        }

        return $this;
    }
834838
public function addError($message, ...$args)
    {
        $message = $this->translate($message);
        if (!empty($args)) $message = vsprintf($message, $args);
        
        $this->errors[] = $message;
    }
475642
public function addMessage($key, $message)
    {
        // Create Array for this key
        if (!isset($this->storage[$this->storageKey][$key])) {
            $this->storage[$this->storageKey][$key] = [];
        }

        // Push onto the array
        $this->storage[$this->storageKey][$key][] = $message;
    }
1106290
protected function setError($code, $message)
    {
        $this->error = new \OtherCode\Rest\Core\Error($code, $message);
    }
753280
@Override
    @SuppressFBWarnings("DM_EXIT")
    public void logError(String message) {
        System.err.println("Error: " + message);
        System.exit(1);
    }
852757
protected function _handleLdapError($message)
    {
        $extendedError = $this->_ldap->getDiagnosticMessage();
        if (!is_null($extendedError)) {
            $this->_errors[] = $extendedError;
        }
        $this->_errors[] = $message;
    }
1218894
public function pushErrorLog($message, array $context = [])
    {
        if ($this->logFile) {
            Log::getInstance([
                'channel' => 'ERROR-SQL',
                'level' => 'info',
                'maxSize' => 1000000, // default
            ])->pushInfo($message, $context);
        }
    }
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;
    }
12494
public function addError($message, ...$text): void
    {
        $this->add(self::TYPE_ERROR, $message, ...$text);
    }