Throws out an {@link InvalidRangeException} with error message specified
when `tester` is `false`.

@param tester
when `false` then throw out the exception
@param msg
the error message format pattern.
@param args
the error message format arguments.
17503
public static void invalidRangeIfNot(boolean tester, String msg, Object... args) {
        if (!tester) {
            throw new InvalidRangeException(msg, args);
        }
    }
21036
public void error( Element e, String msg, Object... args ) {
        messager.printMessage( Diagnostic.Kind.ERROR, String.format( msg, args ), e );
    }
845186
public static String checkNotEmpty(String arg, @Nullable Object errorMessage) {
    boolean empty = Strings.isNullOrEmpty(arg) || CharMatcher.whitespace().matchesAllOf(arg);
    checkArgument(!empty, errorMessage);
    return arg;
  }
864100
void setErrorStatus(String msg, Exception e) {
    this.e = new IOException(msg + " " + (e == null ? "" : e.toString()));
    
    // no more writes will be accepted
    this.isDisabled = true;
    
    // close the executor
    sendExecutor.shutdown();
    LOG.error(msg, e);
  }
1086136
@FormatMethod
  private void reportError(ParseTree parseTree, @FormatString String message, Object... arguments) {
    if (parseTree == null) {
      reportError(message, arguments);
    } else {
      errorReporter.reportError(parseTree.location.start, message, arguments);
    }
  }
94375
static void checkArgument(boolean check, String msg, Object... args) {
    if (!check) {
      throw new IllegalArgumentException(String.format(msg, args));
    }
  }
722465
private String generateInvalidErrorMessage(Object[] enumValues, String testValue)
    {
        StringBuffer errorMessage = new StringBuffer("Unable to convert value [" + testValue + "].");

        errorMessage.append(" Allowed values are (case insensitive) ");

        StringBuffer valueList = new StringBuffer();

        int index = 1;
        for (Object enumValue : enumValues) {
            if (valueList.length() > 0) {
                if (++index == enumValues.length) {
                    valueList.append(" or ");
                } else {
                    valueList.append(", ");
                }
            }

            valueList.append('"');
            valueList.append(enumValue);
            valueList.append('"');
        }

        errorMessage.append(valueList);
        errorMessage.append('.');

        return errorMessage.toString();
    }
322936
@Override
    public void debug(String format, Object arg) {
        if (logger.isDebugEnabled()) {
            FormattingTuple ft = MessageFormatter.format(format, arg);
            logger.debug(ft.getMessage(), ft.getThrowable());
        }
    }
869341
public static void patternFail(int number, String msg, ILexLocation location)
			throws PatternMatchException
	{
		throw new PatternMatchException(number, msg, location);
	}
213761
public static void debug(String msg, Object... args) {
		String tag = generateTag();
		if (!"".equals(tag)) {
			if (args.length > 0) {
				Log.d(tag, String.format(msg, args));
			} else {
				Log.d(tag, msg);

			}
		}
	}
309087
@Nonnull
    LessException createException( String msg ) {
        LessException lessEx = new LessException( msg );
        lessEx.addPosition( filename, line, column );
        return lessEx;
    }
701429
public static void printError(Object caller, String format, Object... args)
	{
		Object msg = String.format(format, args);
		
		printError(caller,msg);
	}
278860
private void logErrorThrow(String format, Object... args) {
        String msg = MessageFormatter.arrayFormat(format, args).getMessage();
        m_logger.error(msg);
        throw new RuntimeException(msg);
    }
1015934
private void checkBlankAndThrowError(String str, String msg) {
    if (StringUtils.isBlank(str)) {
      log.error(msg);
      throw new IllegalArgumentException(msg);
    }
  }
333032
private void reportError(Element e, String msg, Object... msgParams) {
    String formattedMessage = String.format(msg, msgParams);
    processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, formattedMessage, e);
  }
740394
protected void error(String msg)
          throws javax.xml.transform.TransformerException
  {
    error(msg, null);
  }
895947
private void validateMessageForNull(Message msg) throws MessageFormatException {

        // if the supplied message is null, throw a jms MessageFormatException.
        if (msg == null) {
            throw (MessageFormatException) JmsErrorUtils.newThrowable(
                                                                      MessageFormatException.class,
                                                                      "INVALID_VALUE_CWSIA0068",
                                                                      new Object[] { "message", null },
                                                                      tc);
        }
    }