borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.util
java.lang.Object +----java.lang.Throwable +----java.lang.Exception +----borland.jbcl.util.InvalidFormatException
Constructors Properties Methods
Implements Serializable
The InvalidFormatException class is the Exception class generated by format and parser code exceptions. The InvalidFormatException is thrown for low level parsing conflicts, for example, entering "A" in a numeric field, and is generated when editing data and parsing occurs. This occurs in relation to the edit mask and display mask properties of a Column component.
The InvalidFormatException differs from the ValidationException in that the InvalidFormatException can only be triggered when editing is taking place. The ValidationException can be triggered whenever an invalid value is set and doesn't depend on (keystroke) editing of data.
To simplify the handling of InvalidFormatException exceptions, if a MaskableTextItemEditor encounters an exception, it generally wraps it in a ValidationException. The DataSet class has special knowledge about ValidationException objects and automatically sends them to registered status listeners such as the StatusBar. Consequently, an InvalidFormatException caused by a parsing error is often turned into a ValidationException, and the DataSet sends it to the status listeners. As a result, you typically only deal with the ValidationException class when editing a field.
See also: String-based patterns (masks), borland.jbcl.control.ExceptionDialog, borland.jbcl.dataset.ValidationException
public InvalidFormatException(java.lang.String format)
public InvalidFormatException(java.lang.String format, int errorOffset)
public int getErrorOffset()
public static final void fire(java.lang.String string)