Package ch.qos.logback.core.joran.spi

Examples of ch.qos.logback.core.joran.spi.JoranException


      fis = new FileInputStream(file);
      doConfigure(fis);
    } catch (IOException ioe) {
      String errMsg = "Could not open [" + file.getName() + "].";
      addError(errMsg, ioe);
      throw new JoranException(errMsg, ioe);
    } finally {
      if (fis != null) {
        try {
          fis.close();
        } catch (java.io.IOException ioe) {
          String errMsg = "Could not close [" + file.getName() + "].";
          addError(errMsg, ioe);
          throw new JoranException(errMsg, ioe);
        }
      }
    }
  }
View Full Code Here


      in = urlConnection.getInputStream();
      doConfigure(in);
    } catch (IOException ioe) {
      String errMsg = "Could not open URL [" + url + "].";
      addError(errMsg, ioe);
      throw new JoranException(errMsg, ioe);
    } finally {
      if (in != null) {
        try {
          in.close();
        } catch (IOException ioe) {
          String errMsg = "Could not close input stream";
          addError(errMsg, ioe);
          throw new JoranException(errMsg, ioe);
        }
      }
    }
  }
View Full Code Here

      fis = new FileInputStream(file);
      doConfigure(fis);
    } catch (IOException ioe) {
      String errMsg = "Could not open [" + file.getPath() + "].";
      addError(errMsg, ioe);
      throw new JoranException(errMsg, ioe);
    } finally {
      if (fis != null) {
        try {
          fis.close();
        } catch (java.io.IOException ioe) {
          String errMsg = "Could not close [" + file.getName() + "].";
          addError(errMsg, ioe);
          throw new JoranException(errMsg, ioe);
        }
      }
    }
  }
View Full Code Here

      return saxEventList;
    } catch (IOException ie) {
      handleError("I/O error occurred while parsing xml file", ie);
    } catch(SAXException se) {
      // Exception added into StatusManager via Sax error handling. No need to add it again
      throw new JoranException("Problem parsing XML document. See previously reported errors.", se);
    } catch (Exception ex) {
      handleError("Unexpected exception while parsing XML document.", ex);
    }
    throw new IllegalStateException("This point can never be reached");
  }
View Full Code Here

    throw new IllegalStateException("This point can never be reached");
  }

  private void handleError(String errMsg, Throwable t) throws JoranException {
    addError(errMsg, t);
    throw new JoranException(errMsg, t);
  }
View Full Code Here

      spf.setNamespaceAware(true);
      return spf.newSAXParser();
    } catch (Exception pce) {
      String errMsg = "Parser configuration error occurred";
      addError(errMsg, pce);
      throw new JoranException(errMsg, pce);
    }
  }
View Full Code Here

      doConfigure(in);
      in.close();
    } catch (IOException ioe) {
      String errMsg = "Could not open URL [" + url + "].";
      addError(errMsg, ioe);
      throw new JoranException(errMsg, ioe);
    }
  }
View Full Code Here

      fis = new FileInputStream(file);
      doConfigure(fis);
    } catch (IOException ioe) {
      String errMsg = "Could not open [" + file.getPath() + "].";
      addError(errMsg, ioe);
      throw new JoranException(errMsg, ioe);
    } finally {
      if (fis != null) {
        try {
          fis.close();
        } catch (java.io.IOException ioe) {
          String errMsg = "Could not close [" + file.getName() + "].";
          addError(errMsg, ioe);
          throw new JoranException(errMsg, ioe);
        }
      }
    }
  }
View Full Code Here

      return saxEventList;
    } catch (IOException ie) {
      handleError("I/O error occurred while parsing xml file", ie);
    } catch(SAXException se) {
      // Exception added into StatusManager via Sax error handling. No need to add it again
      throw new JoranException("Problem parsing XML document. See previously reported errors.", se);
    } catch (Exception ex) {
      handleError("Unexpected exception while parsing XML document.", ex);
    }
    throw new IllegalStateException("This point can never be reached");
  }
View Full Code Here

    throw new IllegalStateException("This point can never be reached");
  }

  private void handleError(String errMsg, Throwable t) throws JoranException {
    addError(errMsg, t);
    throw new JoranException(errMsg, t);
  }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.joran.spi.JoranException

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.