anchor.diff:  							p = newJava("java.util.regex.Pattern").compile(arguments.type);
   						}
   						catch(java.util.regex.PatternSyntaxException e) {
  -							throw(object=newJava("java.lang.RuntimeException").init("Validation misconfiguration, specified type to validate against was null: context=" & arguments.context & ", type=" & arguments.type & "), input=" & arguments.input));
  +							params = [arguments.context, arguments.type, arguments.input];
  +							throw(object=newJava("java.lang.RuntimeException").init(variables.ESAPI.resourceBundle().messageFormat("Validator.patternMismatch.message", params)));
   						}
   					}
   
   					if(!p.matcher(canonical).matches()) {
  -						throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(ESAPI=variables.ESAPI, userMessage=arguments.context & ": Invalid input. Please conform to: " & p.pattern() & " with a maximum length of " & arguments.maxLength, logMessage="Invalid input: context=" & arguments.context & ", type=" & arguments.type & "(" & p.pattern() & "), input=" & arguments.input, context=arguments.context));
  +						userParams = [arguments.context, p.pattern(), arguments.maxLength];
  +						logParams = [arguments.context, p.pattern(), arguments.type, arguments.input];
  +						throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(ESAPI=variables.ESAPI, userMessage=variables.ESAPI.resourceBundle().messageFormat("Validator.patternMismatch.userMessage", userParams), logMessage=variables.ESAPI.resourceBundle().messageFormat("Validator.patternMismatch.logMessage", logParams), context=arguments.context));
   					}
   
   					return canonical;
   				}
   				catch(org.owasp.esapi.errors.EncodingException e) {
  -					throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(variables.ESAPI, arguments.context & ": Invalid input. An encoding error occurred.", "Error canonicalizing user input", e, arguments.context));
  +					userParams = [arguments.context];
  +					throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(variables.ESAPI, variables.ESAPI.resourceBundle().messageFormat("Validator.badInput.userMessage", userParams), variables.ESAPI.resourceBundle().getMessage("Validator.badInput.logMessage"), e, arguments.context));
   				}
   			}
   		</cfscript>
  
positive.code: 			var as = "";
  			var test = "";
  			var errors = "";
  
  			if(structKeyExists(arguments, "errorList")) {
  				try {
  
negative.code: 
  					if(errors.size() > 0) {
  						// just create new exception to get it logged and intrusion detected
  						userParams = [arguments.context];
  						logParams = [arguments.context, arrayToList(errors)];
  						createObject("component", "org.owasp.esapi.errors.ValidationException").init(ESAPI=variables.ESAPI, userMessage=variables.ESAPI.resourceBundle().messageFormat("Validator.htmlBadInput.userMessage", userParams), logMessage=variables.ESAPI.resourceBundle().messageFormat("Validator.htmlBadInput.logMessage", logParams), context=arguments.context);
  					}
  
  					return test.getCleanHTML().trim();
  				}
  				catch(org.owasp.validator.html.ScanException e) {
  					userParams = [arguments.context];
  					logParams = [arguments.context, e.getMessage()];
  					throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(variables.ESAPI, variables.ESAPI.resourceBundle().messageFormat("Validator.htmlError.userMessage", userParams), variables.ESAPI.resourceBundle().messageFormat("Validator.htmlScanError.logMessage", logParams), e, arguments.context));
  				}
  				catch(org.owasp.validator.html.PolicyException e) {
  					userParams = [arguments.context];
  					logParams = [arguments.context, e.getMessage()];
  					throwException(createObject("component", "org.owasp.esapi.errors.ValidationException").init(variables.ESAPI, variables.ESAPI.resourceBundle().messageFormat("Validator.htmlError.userMessage", userParams), variables.ESAPI.resourceBundle().messageFormat("Validator.htmlPolicyError.logMessage", logParams), e, arguments.context));
  				}
  			}
  		</cfscript>
  
  	</cffunction>
  