gpt4 book ai didi

org.exolab.castor.xml.XMLException.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 14:04:40 28 4
gpt4 key购买 nike

本文整理了Java中org.exolab.castor.xml.XMLException.<init>()方法的一些代码示例,展示了XMLException.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLException.<init>()方法的具体详情如下:
包路径:org.exolab.castor.xml.XMLException
类名称:XMLException
方法名:<init>

XMLException.<init>介绍

[英]Creates a new instance of this class with no message or nested exception.
[中]创建该类的新实例,不包含任何消息或嵌套异常。

代码示例

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

/**
 * This method is called for a general error.
 * 
 * @param ex the Exception that caused the error.
 */
public void error(Exception ex) throws XMLException {
 if (getDocumentLocator() != null) {
  String err = "An error occured at line: " + getDocumentLocator().getLineNumber();
  throw new XMLException(err, ex);
 }
 throw new XMLException(ex);
}

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

/**
 * This method is called when an out of order element is encountered
 **/
public void outOfOrder(String name) throws XMLException {
 String err = new StringBuilder("out of order element <").append(name).append("> found in <")
   .append(elementName()).append(">.").toString();
 throw new XMLException(err);
}

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

/**
 * This method is called for a general error.
 *
 * @param ex the Exception that caused the error.
 */
public void error(Exception ex)
  throws XMLException
{
  if (getDocumentLocator() != null) {
    String err =  "An error occured at line: " + getDocumentLocator().getLineNumber();
    throw new XMLException(err, ex);
  }
  throw new XMLException(ex);
} //-- error

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

/**
 * This method is called when an out of order element is encountered
**/
public void outOfOrder(String name)
  throws XMLException
{
  StringBuffer err = new StringBuffer("out of order element <");
  err.append(name);
  err.append("> found in <");
  err.append(elementName());
  err.append(">.");
  throw new XMLException(err.toString());
}

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

protected URILocation derive(Locator locator, String schemaLocation) throws XMLException {
 try {
  String documentBase = locator.getSystemId();
  if (documentBase != null) {
   if (!documentBase.endsWith("/"))
    documentBase = documentBase.substring(0, documentBase.lastIndexOf("/") + 1);
  }
  return getURIResolver().resolve(schemaLocation, documentBase);
 } catch (URIException ure) {
  throw new XMLException(ure);
 }
 
}

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

/**
 * This method is called for a general error.
 * 
 * @param err the error message to report
 **/
public void error(String err) throws XMLException {
 if (getDocumentLocator() != null) {
  err += "\n   line: " + getDocumentLocator().getLineNumber();
 }
 throw new XMLException(err);
}

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

/**
 * This method is called for a general error.
 * @param err the error message to report
**/
public void error(String err)
  throws XMLException
{
  if (getDocumentLocator() != null) {
    err += "\n   line: " + getDocumentLocator().getLineNumber();
  }
  throw new XMLException(err);
} //-- error

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

/**
 * This method is called when an illegal Attribute is encountered.
 * 
 * @param attName the name of the illegal attribute.
 **/
public void illegalAttribute(String attName) throws XMLException {
 String err = "Illegal attribute '" + attName + "' found on element <" + elementName() + ">.";
 if (getDocumentLocator() != null) {
  err += "\n   line: " + getDocumentLocator().getLineNumber();
 }
 throw new XMLException(err);
}

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

/**
 * This method is called when an illegal Element is encountered.
 * 
 * @param name the name of the illegal element
 **/
public void illegalElement(String name) throws XMLException {
 String err = "Illegal element '" + name + "' found as child of <" + elementName() + ">.";
 if (getDocumentLocator() != null) {
  err += "\n   line: " + getDocumentLocator().getLineNumber();
 }
 throw new XMLException(err);
}

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

throw new XMLException(errors.toString());

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

/**
 * This method is called when an illegal Attribute is encountered.
 * @param attName the name of the illegal attribute.
**/
public void illegalAttribute(String attName)
  throws XMLException
{
  String err = "Illegal attribute '" + attName +
    "' found on element <" + elementName() + ">.";
  if (getDocumentLocator() != null) {
    err += "\n   line: " + getDocumentLocator().getLineNumber();
  }
  throw new XMLException(err);
} //-- illegalAttribute

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

/**
 * This method is called when an illegal Element is encountered.
 * @param name the name of the illegal element
**/
public void illegalElement(String name)
  throws XMLException
{
  String err = "Illegal element '" + name +
    "' found as child of <" + elementName() + ">.";
  if (getDocumentLocator() != null) {
    err += "\n   line: " + getDocumentLocator().getLineNumber();
  }
  throw new XMLException(err);
} //-- illegalElement

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

/**
 * This method is called when an element which may only be defined once, is redefined.
 * 
 * @param name the name of the element
 **/
public void redefinedElement(String name, String xtraInfo) throws XMLException {
 String err = "redefintion of element '" + name + "' within element <" + elementName() + ">.";
 if (getDocumentLocator() != null) {
  err += "\n   line: " + getDocumentLocator().getLineNumber();
 }
 if (xtraInfo != null) {
  err += "\n   " + xtraInfo;
 }
 throw new XMLException(err + "\n");
}

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

throw new XMLException(errors.toString());

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

/**
 * This method is called when an element which may only
 * be defined once, is redefined.
 * @param name the name of the element
**/
public void redefinedElement(String name, String xtraInfo)
  throws XMLException
{
  String err = "redefintion of element '" + name +
    "' within element <" + elementName() + ">.";
  if (getDocumentLocator() != null) {
    err += "\n   line: " + getDocumentLocator().getLineNumber();
  }
  if (xtraInfo != null) {
    err += "\n   " + xtraInfo;
  }
  throw new XMLException(err+"\n");
} //-- redefinedElement

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

throw new XMLException(error);

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

throw new XMLException(error);

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

throw new XMLException(ure);

代码示例来源:origin: org.codehaus.castor/com.springsource.org.exolab.castor.xml

throw new XMLException(urix);

代码示例来源:origin: org.codehaus.castor/castor-xml-schema

uri = getURIResolver().resolveURN(namespace);
} catch (URIException urix) {
 throw new XMLException(urix);

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com