public static void _error(Map<?, ?> args, Closure body, PrintWriter out, ExecutableTemplate template, int fromLine) {
if (args.get("arg") == null && args.get("key") == null) {
throw new TemplateExecutionException(template.template, fromLine, "Please specify the error key", new TagInternalException("Please specify the error key"));
}
String key = args.get("arg") == null ? args.get("key") + "" : args.get("arg") + "";
Error error = Validation.error(key);
if (error != null) {
if (args.get("field") == null) {
out.print(error.message());
} else {
out.print(error.message(args.get("field") + ""));
}
}
}