Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2004-2008 the original author or authors.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  * 
  *      http://www.apache.org/licenses/LICENSE-2.0
  * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.binding.format;

Thrown when a formatted value is of the wrong form.

Author(s):
Keith Donald
public class InvalidFormatException extends RuntimeException {
Create a new invalid format exception.

Parameters:
invalidValue the invalid value
expectedFormat the expected format
	public InvalidFormatException(String invalidValueString expectedFormat) {
		this(invalidValueexpectedFormatnull);
	}

Create a new invalid format exception.

Parameters:
invalidValue the invalid value
expectedFormat the expected format
cause the underlying cause of this exception
	public InvalidFormatException(String invalidValueString expectedFormatThrowable cause) {
		super("Invalid format for value '" + invalidValue + "'; the expected format was '" + expectedFormat + "'",
				cause);
		this. = invalidValue;
		this. = expectedFormat;
	}

Create a new invalid format exception.

Parameters:
invalidValue the invalid value
expectedFormat the expected format
message a descriptive message
cause the underlying cause of this exception
	public InvalidFormatException(String invalidValueString expectedFormatString messageThrowable cause) {
		super(messagecause);
		this. = invalidValue;
		this. = expectedFormat;
	}

Returns the invalid value.
	public String getInvalidValue() {
		return ;
	}

Returns the expected format.
	}
New to GrepCode? Check out our FAQ X