The Error Object

 <  Day Day Up  >  

The Error Object

Individual Error objects are part of the Errors collection. Each Error object is associated with a node in the underlying XML DOM of a form template. When a validation error occurs on a DOM node, a corresponding Error object is created and added to the Errors collection.

There are three situations in which an Error object is created:

  • SCHEMA_VALIDATION ” This error occurs when there is a failure of W3C XML Schema validation.

  • SYSTEM_GENERATED ” Two situations produce this error. In the first, validation fails as a result of constraints contained in the manifest file, which are created by defining validation rules using the InfoPath user interface. In the second, scripting code calls the ReportError method of the DataDOMEvent object.

  • USER_SPECIFIED ” This occurs when custom script uses the Add method of the Errors collection to add an Error object to the Errors collection.

Error Object Methods

The Error object has no methods.

Error Object Properties

The Error object has six properties:

  • ConditionName ” A string value. Returns the name of the error. The ConditionName property is used only for errors that are user-specified . For schema validation or system-generated errors, the ConditionName property has the value null . Security level 2.

  • DetailedErrorMessage ” The detailed error message associated with the Error object. Security level 2.

  • ErrorCode ” A long integer value. Security level 2.

  • Node ” Read-only. A reference to the XML DOM node that's associated with the Error object. Security level 2.

  • ShortError ” A string value that is the short error message associated with the Error object. Security level 2.

  • Type ” A string value that describes the type of error. The three permitted values are SCHEMA_VALIDATION , SYSTEM_GENERATED , and USER_SPECIFIED . Security level 2.

 <  Day Day Up  >  


Microsoft Office InfoPath 2003 Kick Start
Microsoft Office InfoPath 2003 Kick Start
ISBN: 067232623X
EAN: 2147483647
Year: 2004
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net