src/main/java/gov/usgs/cida/pubs/webservice/GlobalDefaultExceptionHandler.java
private String formatErrorMessage(BindException ex) {
		StringBuilder errorMess =  new StringBuilder(100);
		String sep = "";

		for(FieldError err: ex.getFieldErrors()) {
			String mess = err.getDefaultMessage() == null ? " Error processing field" : err.getDefaultMessage();
			mess = mess.replaceAll(NESTED_EXCEPTION_REGEX, "");
			String prefix = "Error in parameter " + err.getField() + ":";
			errorMess.append(sep).append(prefix).append(mess);
			sep = " -- ";
		}

		return errorMess.toString();
	}
// parse out a user friendly field message from the field error in the binding exception
parse out a user friendly field message from the field error in the binding exception
parse out a user friendly field message from the field error in the binding exception
private String formatErrorMessage(BindException ex) {
		StringBuilder errorMess =  new StringBuilder(100);
		String sep = "";
		for(FieldError err: ex.getFieldErrors()) {
			String mess = err.getDefaultMessage() == null ? " Error processing field" : err.getDefaultMessage();
			mess = mess.replaceAll(NESTED_EXCEPTION_REGEX, "");
			String prefix = "Error in parameter " + err.getField() + ":";
			errorMess.append(sep).append(prefix).append(mess);
			sep = " -- ";
		}
		return errorMess.toString();
	}
private String formatErrorMessage ( BindException ex ) { StringBuilder errorMess = new StringBuilder ( 100 ) ; String sep = "" ; for ( FieldError err : ex . getFieldErrors ( ) ) { String mess = err . getDefaultMessage ( ) == null ? " Error processing field" : err . getDefaultMessage ( ) ; mess = mess . replaceAll ( NESTED_EXCEPTION_REGEX , "" ) ; String prefix = "Error in parameter " + err . getField ( ) + ":" ; errorMess . append ( sep ) . append ( prefix ) . append ( mess ) ; sep = " -- " ; } return errorMess . toString ( ) ; }
parse out a user friendly field message from the field error in the binding exception
parse out a user friendly field message from the field error in the binding exception