protected final TemplateModelException newMethodArgInvalidValueException(int argIdx, Object[] details) { return _MessageUtil.newMethodArgInvalidValueException("?" + key, argIdx, details); }
private TemplateModelException newIndexLessThan0Exception( int argIdx, int idx) throws TemplateModelException { return _MessageUtil.newMethodArgInvalidValueException( "?" + key, argIdx, "The index must be at least 0, but was ", Integer.valueOf(idx), "."); }
private TemplateModelException newIndexGreaterThanLengthException( int argIdx, int idx, final int len) throws TemplateModelException { return _MessageUtil.newMethodArgInvalidValueException( "?" + key, argIdx, "The index mustn't be greater than the length of the string, ", Integer.valueOf(len), ", but it was ", Integer.valueOf(idx), "."); }
private boolean getBooleanOption(String optionName, TemplateModel value) throws TemplateModelException { if (!(value instanceof TemplateBooleanModel)) { throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "The value of the ", new _DelayedJQuote(optionName), " option must be a boolean, but it was ", new _DelayedAOrAn(new _DelayedFTLTypeDescription(value)), "."); } return ((TemplateBooleanModel) value).getAsBoolean(); }
private String getStringOption(String optionName, TemplateModel value) throws TemplateModelException { if (!(value instanceof TemplateScalarModel)) { throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "The value of the ", new _DelayedJQuote(optionName), " option must be a string, but it was ", new _DelayedAOrAn(new _DelayedFTLTypeDescription(value)), "."); } return EvalUtil.modelToString((TemplateScalarModel) value, null, null); }
throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "All keys in the options hash must be strings, but found ", new _DelayedAOrAn(new _DelayedFTLTypeDescription(optNameTM))); parse = getBooleanOption(OPTION_PARSE, optValue); } else { throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "Unsupported option ", new _DelayedJQuote(optName), "; valid names are: ", new _DelayedJQuote(OPTION_ENCODING), ", ", new _DelayedJQuote(OPTION_PARSE), ".");
protected final TemplateModelException newMethodArgInvalidValueException(int argIdx, Object[] details) { return _MessageUtil.newMethodArgInvalidValueException("?" + key, argIdx, details); }
protected final TemplateModelException newMethodArgInvalidValueException(int argIdx, Object[] details) { return _MessageUtil.newMethodArgInvalidValueException("?" + key, argIdx, details); }
private TemplateModelException newIndexLessThan0Exception( int argIdx, int idx) throws TemplateModelException { return _MessageUtil.newMethodArgInvalidValueException( "?" + key, argIdx, "The index must be at least 0, but was ", Integer.valueOf(idx), "."); }
private TemplateModelException newIndexLessThan0Exception( int argIdx, int idx) throws TemplateModelException { return _MessageUtil.newMethodArgInvalidValueException( "?" + key, argIdx, "The index must be at least 0, but was ", Integer.valueOf(idx), "."); }
private TemplateModelException newIndexGreaterThanLengthException( int argIdx, int idx, final int len) throws TemplateModelException { return _MessageUtil.newMethodArgInvalidValueException( "?" + key, argIdx, "The index mustn't be greater than the length of the string, ", Integer.valueOf(len), ", but it was ", Integer.valueOf(idx), "."); }
private TemplateModelException newIndexGreaterThanLengthException( int argIdx, int idx, final int len) throws TemplateModelException { return _MessageUtil.newMethodArgInvalidValueException( "?" + key, argIdx, "The index mustn't be greater than the length of the string, ", Integer.valueOf(len), ", but it was ", Integer.valueOf(idx), "."); }
private String getStringOption(String optionName, TemplateModel value) throws TemplateModelException { if (!(value instanceof TemplateScalarModel)) { throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "The value of the ", new _DelayedJQuote(optionName), " option must be a string, but it was ", new _DelayedAOrAn(new _DelayedFTLTypeDescription(value)), "."); } return EvalUtil.modelToString((TemplateScalarModel) value, null, null); }
private boolean getBooleanOption(String optionName, TemplateModel value) throws TemplateModelException { if (!(value instanceof TemplateBooleanModel)) { throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "The value of the ", new _DelayedJQuote(optionName), " option must be a boolean, but it was ", new _DelayedAOrAn(new _DelayedFTLTypeDescription(value)), "."); } return ((TemplateBooleanModel) value).getAsBoolean(); }
private boolean getBooleanOption(String optionName, TemplateModel value) throws TemplateModelException { if (!(value instanceof TemplateBooleanModel)) { throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "The value of the ", new _DelayedJQuote(optionName), " option must be a boolean, but it was ", new _DelayedAOrAn(new _DelayedFTLTypeDescription(value)), "."); } return ((TemplateBooleanModel) value).getAsBoolean(); }
private String getStringOption(String optionName, TemplateModel value) throws TemplateModelException { if (!(value instanceof TemplateScalarModel)) { throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "The value of the ", new _DelayedJQuote(optionName), " option must be a string, but it was ", new _DelayedAOrAn(new _DelayedFTLTypeDescription(value)), "."); } return EvalUtil.modelToString((TemplateScalarModel) value, null, null); }
throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "All keys in the options hash must be strings, but found ", new _DelayedAOrAn(new _DelayedFTLTypeDescription(optNameTM))); parse = getBooleanOption(OPTION_PARSE, optValue); } else { throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "Unsupported option ", new _DelayedJQuote(optName), "; valid names are: ", new _DelayedJQuote(OPTION_ENCODING), ", ", new _DelayedJQuote(OPTION_PARSE), ".");
throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "All keys in the options hash must be strings, but found ", new _DelayedAOrAn(new _DelayedFTLTypeDescription(optNameTM))); parse = getBooleanOption(OPTION_PARSE, optValue); } else { throw _MessageUtil.newMethodArgInvalidValueException(methodName, 1, "Unsupported option ", new _DelayedJQuote(optName), "; valid names are: ", new _DelayedJQuote(OPTION_ENCODING), ", ", new _DelayedJQuote(OPTION_PARSE), ".");