InputValueFormatException class

InputValueFormatException can be used as a convenient way to catch all the input value format issue in the state development, as shown below.

Syntax

public class InputValueFormatException

Remarks

		try {
			InputValue iValue;

			iValue = inCustomerName.getInputValue();
			if (iValue!=null) { 
				String name = iValue.getString().trim();                
				if (!validFullName(name)) {
					throw new InputValueFormatException("Invalid: " +
								inCustomerName.getDescription());
				}
				customer.setDisplayName(name);
			}

			//
			// Check the second attribute, etc..
			//

		} catch (InputValueFormatException fex) {

			//
			// Catch all in one location
			//
			log.error(fex.getMessage(), fex);
			return continueDyn(-9);
		}