Package org.jibx.runtime

Examples of org.jibx.runtime.JiBXParseException


        "namespace", "tag", "abc"));
    try {
      uctx.parseElementFloat("namespace", "tag", (float) 1.0);
      fail("Expected JiBXParseException to be thrown");
    } catch (JiBXException e) {
      assertEquals(e, new JiBXParseException(null, "abc", "namespace", "tag", null));
    }
  }
View Full Code Here


    uctx.setDocument(new TestDocument("attr", "abc"));
    try {
      uctx.attributeDouble("namespace", "attr");
      fail("Expected JiBXParseException to be thrown");
    } catch (JiBXException e) {
      assertEquals(e, new JiBXParseException(null, "abc", "namespace", "attr", null));
    }
  }
View Full Code Here

    uctx.setDocument(new TestDocument("attr", "abc"));
    try {
      uctx.attributeDouble("namespace", "attr", 1.0);
      fail("Expected JiBXParseException to be thrown");
    } catch (JiBXException e) {
      assertEquals(e, new JiBXParseException(null, "abc", "namespace", "attr", null));
    }
  }
View Full Code Here

        "namespace", "tag", "abc"));
    try {
      uctx.parseElementDouble("namespace", "tag");
      fail("Expected JiBXParseException to be thrown");
    } catch (JiBXException e) {
      assertEquals(e, new JiBXParseException(null, "abc", "namespace", "tag", null));
    }
  }
View Full Code Here

        "namespace", "tag", "abc"));
    try {
      uctx.parseElementDouble("namespace", "tag", 1.0);
      fail("Expected JiBXParseException to be thrown");
    } catch (JiBXException e) {
      assertEquals(e, new JiBXParseException(null, "abc", "namespace", "tag", null));
    }
  }
View Full Code Here

    public int parseContentInt(String ns, String tag) throws JiBXException {
        String text = parseContentText(ns, tag);
        try {
            return Utility.parseInt(text);
        } catch (JiBXException ex) {
            throw new JiBXParseException(ex.getMessage() + ' ' +
                buildPositionString(), text, ns, tag, ex.getRootCause());
        }
    }
View Full Code Here

    public int attributeInt(String ns, String name) throws JiBXException {
        String text = attributeText(ns, name);
        try {
            return Utility.parseInt(text);
        } catch (JiBXException ex) {
            throw new JiBXParseException(ex.getMessage() + ' ' +
                buildPositionString(), text, ns, name, ex.getRootCause());
        }
    }
View Full Code Here

            return dflt;
        } else {
            try {
                return Utility.parseInt(value);
            } catch (JiBXException ex) {
                throw new JiBXParseException(ex.getMessage() + ' ' +
                    buildPositionString(), value, ns, name, ex.getRootCause());
            }
        }
    }
View Full Code Here

     */
    public byte convertByte(String text) throws JiBXException {
        try {
            return Utility.parseByte(text);
        } catch (JiBXException ex) {
            throw new JiBXParseException(ex.getMessage() + ' ' +
                buildPositionString(), text, ex.getRootCause());
        }
    }
View Full Code Here

     */
    public short convertShort(String text) throws JiBXException {
        try {
            return Utility.parseShort(text);
        } catch (JiBXException ex) {
            throw new JiBXParseException(ex.getMessage() + ' ' +
                buildPositionString(), text, ex.getRootCause());
        }
    }
View Full Code Here

TOP

Related Classes of org.jibx.runtime.JiBXParseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.