Examples of ErrorItem


Examples of org.apache.log4j.spi.ErrorItem

        result = ((Integer) o1).intValue();
      } else {
        String errMsg =
          "Object [" + o1
          + "] currently at the top of the stack is not an integer.";
        ec.addError(new ErrorItem(errMsg));
        throw new IllegalArgumentException(errMsg);
      }
    } catch (EmptyStackException ese) {
      ec.addError(
        new ErrorItem("Expecting an integer on the execution stack."));
      throw ese;
    }
    return result;
  }
View Full Code Here

Examples of org.apache.log4j.spi.ErrorItem

        result = ((Integer) o1).intValue();
      } else {
        String errMsg =
          "Object [" + o1
          + "] currently at the top of the stack is not an integer.";
        ec.addError(new ErrorItem(errMsg));
        throw new IllegalArgumentException(errMsg);
      }
    } catch (EmptyStackException ese) {
      ec.addError(
        new ErrorItem("Expecting an integer on the execution stack."));
      throw ese;
    }
    return result;
  }
View Full Code Here

Examples of org.apache.log4j.spi.ErrorItem

    int result = XMLUtil.checkIfWellFormed(filename, errorList);
    switch (result) {
    case XMLUtil.ILL_FORMED:
    case XMLUtil.UNRECOVERABLE_ERROR:
      errorList.add(
        new ErrorItem(
          "Problem parsing XML document. See previously reported errors. Abandoning all furhter processing."));
      return;
    }

    FileInputStream fis = null;
    try {
      fis = new FileInputStream(filename);
      doConfigure(fis, repository);
    } catch (IOException ioe) {
      String errMsg = "Could not open [" + filename + "].";
      getLogger(repository).error(errMsg, ioe);
      ec.addError(new ErrorItem(errMsg, ioe));
    } finally {
      if (fis != null) {
        try {
          fis.close();
        } catch (java.io.IOException e) {
View Full Code Here

Examples of org.apache.log4j.spi.ErrorItem

    } catch (SAXException e) {
      // all exceptions should have been recorded already.
    } catch (ParserConfigurationException pce) {
      errMsg = "Parser configuration error occured";
      getLogger(repository).error(errMsg, pce);
      ec.addError(new ErrorItem(errMsg, pce));
    } catch (IOException ie) {
      errMsg = "I/O error occured while parsing xml file";
      ec.addError(new ErrorItem("Parser configuration error occured", ie));
    } finally {
      detachListAppender(repository);
    }
  }
View Full Code Here

Examples of org.apache.log4j.spi.ErrorItem

  WellfomednessChecker(List errorList) {
    this.errorList = errorList;
  }
 
  public void error(SAXParseException spe) throws SAXException {
    ErrorItem errorItem = new ErrorItem("Parsing error", spe);
    errorItem.setLineNumber(spe.getLineNumber());
    errorItem.setColNumber(spe.getColumnNumber());
    errorList.add(errorItem);
  }
View Full Code Here

Examples of org.apache.log4j.spi.ErrorItem

    errorItem.setColNumber(spe.getColumnNumber());
    errorList.add(errorItem);
  }

  public void fatalError(SAXParseException spe) throws SAXException {
    ErrorItem errorItem = new ErrorItem("Parsing fatal error", spe);
    errorItem.setLineNumber(spe.getLineNumber());
    errorItem.setColNumber(spe.getColumnNumber());
    errorList.add(errorItem);

  }
View Full Code Here

Examples of org.apache.log4j.spi.ErrorItem

    errorList.add(errorItem);

  }

  public void warning(SAXParseException spe) throws SAXException {
    ErrorItem errorItem = new ErrorItem("Parsing warning", spe);
    errorItem.setLineNumber(spe.getLineNumber());
    errorItem.setColNumber(spe.getColumnNumber());
    errorList.add(errorItem);
  }
View Full Code Here

Examples of org.apache.log4j.spi.ErrorItem

    try {
      fis = new FileInputStream(filename);
      returnCode = checkIfWellFormed(new InputSource(fis), errorList);
    } catch (IOException ioe) {
      String errMsg = "Could not open [" + filename + "].";
      errorList.add(new ErrorItem(errMsg, ioe));
      returnCode = UNRECOVERABLE_ERROR;
    } finally {
      if (fis != null) {
        try {
          fis.close();
View Full Code Here

Examples of org.apache.log4j.spi.ErrorItem

    try {
      in  = url.openStream();
      returnCode = checkIfWellFormed(new InputSource(in), errorList);
    } catch (IOException ioe) {
      String errMsg = "Could not open [" + url + "].";
      errorList.add(new ErrorItem(errMsg, ioe));
      returnCode = UNRECOVERABLE_ERROR;
    } finally {
      if (in != null) {
        try {
          in.close();
View Full Code Here

Examples of org.apache.log4j.spi.ErrorItem

      result = WELL_FORMED;     
    } catch(org.xml.sax.SAXParseException se) {
      result = ILL_FORMED;
    } catch (Exception ex) {
      errorList.add(
        new ErrorItem("Problem while checking well-formedness", ex));
      result = UNRECOVERABLE_ERROR;
    }

    return result;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.