com.ibm.ia.common

Class InvalidDataElementException

  • All Implemented Interfaces:
    java.io.Serializable


    public class InvalidDataElementException
    extends DataParseException

    An exception that is thrown by an event parsing API when solution model is missing data in supplied serialization.

    The following example shows how this exception can be caught to determine that an XML string is missing event data.

         try {
             event = eventFactory.parseEvent(DataFormat.TYPED_XML, inputString);
             
         } catch (UnknownDataElementException e) {
             // the XML content in inputString is not a event in the solution
             
         } catch (InvalidDataElementException ie) {
                    String elementName = ie.getInvalidElementName();
             // the XML content in inputString is missing data for [elementName]     
             
         } catch (DataParseException e) {
             // inputString is not valid XML content
             
         }
     
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      InvalidDataElementException(java.lang.String msg, java.lang.Throwable cause, java.lang.String elementName) 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String getInvalidElementName()
      Returns a string representing the element that has invalid or missing data.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • InvalidDataElementException

        public InvalidDataElementException(java.lang.String msg,
                                   java.lang.Throwable cause,
                                   java.lang.String elementName)
    • Method Detail

      • getInvalidElementName

        public java.lang.String getInvalidElementName()
        Returns a string representing the element that has invalid or missing data.
        Returns:

© Copyright IBM 2017