borland Packages  Class Hierarchy  dx.text Package 

InvalidFormatException class

java.lang.Object
   +----java.lang.Throwable
           +----java.lang.Exception
                   +----com.borland.dx.text.InvalidFormatException

About the InvalidFormatException class

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 an edited data value is parsed. This is determined by the editMask and displayMask 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.

The DataSet class has special knowledge about ValidationException objects and automatically sends them to registered status listeners. 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)


InvalidFormatException constructors

InvalidFormatException properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

Properties implemented in java.lang.Throwable

InvalidFormatException methods

Methods implemented in this class

Methods implemented in java.lang.Object

Methods implemented in java.lang.Throwable


InvalidFormatException constructors

InvalidFormatException(java.lang.String)

  public InvalidFormatException(String format)
Constructs an InvalidFormatException object that contains the editing error.

Parameters:

format
The string describing the editing error that occurred.

InvalidFormatException(java.lang.String, int)

  public InvalidFormatException(String format, int errorOffset)
Constructs an InvalidFormatException object that contains the editing error and the offset of the error.

Parameters:

format
The string describing the editing error that occurred.
errorOffset
The cursor position for this error.

InvalidFormatException properties

errorOffset

 public int getErrorOffset()
Returns the cursor position for this error.

InvalidFormatException methods

fire(java.lang.String)

  public static final void fire(String string)
Throws an InvalidFormatException.

Parameters:

string
The string describing the error.