Throw an error.

@param msg Message Key for the error
962069
public void error(String msg)
  {

    System.out.println("DOM ERROR! class: " + this.getClass().getName());

    throw new RuntimeException(XMLMessages.createXMLMessage(msg, null));
  }
810985
public static void error(final Object message, final Throwable t) {
        errorStream.println(APP_ERROR + message.toString());
        errorStream.println(stackTraceToString(t));
    }
1136063
protected function throwException($code, $msg)
    {
        $args = func_get_args();

        $code = array_shift($args);

        throw new \RuntimeException(call_user_func_array('sprintf', $args), $code);
    }
258423
public function addError(string $msg, string ...$args): void
    {
        $this->errors[] = sprintf($msg, ...$args);
    }
260958
public void error(Object message, Throwable t)
    {
        if (IS12)
        {
            getLogger().log(FQCN, Level.ERROR, message, t);
        }
        else
        {
            getLogger().log(FQCN, Level.ERROR, message, t);
        }
    }
176749
public void throwMojoException(String msg, Throwable e) throws MojoExecutionException {
        if (failOnError) {
            throw new MojoExecutionException(msg, e);
        } else {
            getLog().error(msg, e);
        }
    }
486969
public void error(final String msg) {
        if (proxy.isErrorEnabled()) {
            if (proxy instanceof LocationAwareLogger) {
                ((LocationAwareLogger) proxy).log(null, FQCN, LocationAwareLogger.ERROR_INT, msg, null, null);
            } else {
                proxy.error(msg);
            }
        }
    }
1215966
public void setErrorMessage(String errorMessage) {

        m_errorMessage = errorMessage;
        m_errorLabel.setValue(errorMessage != null ? errorMessage : "");
    }
373426
public static void throww(Throwable e, String msg) {
		if (e instanceof RuntimeException) {
			throw (RuntimeException) e;
		}
		throw new JKException(msg, e);
	}
426593
protected static void reportError(String message, Object... parameters) {
		Throwable cause = null;
		for (int i = 0; cause == null && i < parameters.length; ++i) {
			if (parameters[i] instanceof Throwable) {
				cause = (Throwable) parameters[i];
			}
		}
		final String msg = MessageFormat.format(message, parameters);
		if (cause != null) {
			throw new ParsingException(msg, null, 1, Throwables.getRootCause(cause));
		}
		throw new ParsingException(msg, null, 1);
	}
765689
public void warn(String msg, Throwable t)
	{
		log(LogLevel.WARN, msg, t);
	}
11525
public void warn(String msg) {
        if (logger.isLoggable(Level.WARNING)) {
            log(SELF, Level.WARNING, msg, null);
        }
    }
20415
public function error(int $code = 0, string $msg = null, ...$args): void
    {
        if ($msg !== null && $args !== []) {
            $msg = \sprintf($msg, ...$args);
        }

        /* @noinspection PhpUnhandledExceptionInspection */
        throw new ActionError($msg, $code);
    }
288905
public void error(final String msg)
    {
        errors++;

        if (!suppressOutput)
        {
            out.println("ERROR: " + msg);
        }

        if (stopOnError)
        {
            throw new IllegalArgumentException(msg);
        }
    }
598002
protected void error(String msg) {
		System.err.println(CSLToolContext.current().getToolName() + ": " + msg);
	}
1370700
private void checkEglError(String msg) {
        int error;
        if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
            throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
        }
    }
740860
@Override
    public void error(String msg, Throwable error) {
        try {
            if ((verbose || stacktrace) && error != null) {
                printStackTrace(msg, error);
                error(ERROR, msg);
            } else {
                error(ERROR, msg + STACKTRACE_MESSAGE);
            }
        } finally {
            postPrintMessage();
        }
    }