Package com.substanceofcode.utils

Examples of com.substanceofcode.utils.CauseException


            m_bookmarkList.insert(m_addBkmrk++, name, null);
          }
        } else {
          /* Error:  Feed already exists with name (name) */
          /*.  Existing feed not updated. */
          CauseException ce = new CauseException(
              ResourceProviderME.get("exc.fd.ex", name));
          m_loadForm.appendMsg(ce.getMessage());
          m_loadForm.addExc(ce);
          notesShown = true;
        }
      }
    }
View Full Code Here


                      //#endif
                      );
    } catch (CauseException e) {
      throw e;
    } catch (Throwable t) {
      CauseException cex = new CauseException(
          "Error while parsing HTML Link feed " + m_url, t);
//#ifdef DLOGGING
//@      logger.severe(cex.getMessage(), cex);
//#endif
      System.err.println(cex.getMessage() + " " + t + " " + t.getMessage());
      throw cex;
    }
  }
View Full Code Here

      CauseMemoryException cex = new CauseMemoryException(
          "Out of memory error while parsing HTML Link feed " + url,
          ex);
      throw cex;
        } catch (Exception ex) {
      CauseException cex = new CauseException(
          "Error while parsing HTML Link feed " + url, ex);
            System.err.println(cex.getMessage() + " " + ex + " " + ex.toString());
      ex.printStackTrace();
//#ifdef DLOGGING
//@      logger.severe(cex.getMessage(), cex);
//#endif
      throw cex;
        } catch (Throwable t) {
      CauseException cex = new CauseException(
          "Error while parsing HTML Link feed " + url, t);
            System.err.println(cex.getMessage() + " " + t + " " + t.toString());
      t.printStackTrace();
//#ifdef DLOGGING
//@      logger.severe(cex.getMessage(), cex);
//#endif
      throw cex;
View Full Code Here

      ex.printStackTrace();
      //#ifdef DLOGGING
//@      m_logger.severe("FeedListParser.run(): Error while parsing " +
//@                  "feeds: " + m_url, ex);
      //#endif
      CauseException cex = new CauseException(
          "Error while parsing Opml feed " + m_url, ex);
      throw cex;
        } catch (OutOfMemoryError ex) {
      rssFeeds = null;
      CauseMemoryException cex = new CauseMemoryException(
          "Out of memory error while parsing OPML feed " +
          m_url, ex);
      //#ifdef DLOGGING
//@      m_logger.severe("FeedListParser.run(): Error while parsing " +
//@                  "feeds: " + m_url, ex);
      //#endif
      throw cex;
        } catch (Throwable t) {
            System.err.println("OpmlParser.parseFeeds(): Exception " + t.toString());
      t.printStackTrace();
      CauseException ex = new CauseException(
          "Error while parsing Opml feed " + m_url, t);
      //#ifdef DLOGGING
//@      m_logger.severe("FeedListParser.run(): Error while parsing " +
//@                  "feeds: " + m_url, ex);
      //#endif
View Full Code Here

      //#ifdef DLOGGING
//@      logger.severe("FeedListParser.run(): Error while parsing " +
//@                "feeds: " + m_url, ex);
      //#endif
            System.err.println("FeedListParser.run(): Error while parsing feeds: " + ex.toString());
      m_ex = new CauseException("Error while parsing feed " + m_url, ex);
        } catch( CauseMemoryException ex ) {
      m_feeds = null;
      System.gc();
      m_ex = new CauseMemoryException("Out of memory error while " +
          "parsing feed " + m_url, ex);
      //#ifdef DLOGGING
//@      logger.severe(m_ex.getMessage(), ex);
      //#endif
        } catch( Exception ex ) {
      //#ifdef DLOGGING
//@      logger.severe("FeedListParser.run(): Error while parsing " +
//@                "feeds: " + m_url, ex);
      //#endif
            System.err.println("FeedListParser.run(): Error while parsing feeds: " + ex.toString());
      m_ex = new CauseException("Error while parsing feed " + m_url, ex);
        } catch( OutOfMemoryError t ) {
      m_feeds = null;
      System.gc();
      //#ifdef DLOGGING
//@      logger.severe("FeedListParser.run(): Out Of Memory Error while " +
//@          "parsing feeds: " + m_url, t);
      //#endif
            System.err.println("FeedListParser.run(): " +
          "Out Of Memory Error while parsing feeds: " + t.toString());
      m_ex = new CauseMemoryException("Out Of Memory Error while " +
          "parsing feed " + m_url, t);
        } catch( Throwable t ) {
      //#ifdef DLOGGING
//@      logger.severe("FeedListParser.run(): Error while parsing " +
//@                "feeds: " + m_url, t);
      //#endif
            System.err.println("FeedListParser.run(): Error while parsing feeds: " + t.toString());
      m_ex = new CauseException("Internal error while parsing feed " +
                    m_url, t);
        } finally {
            m_ready = true;
        }       
    } 
View Full Code Here

      }
        } catch(CauseMemoryException e) {
      throw e;
        } catch(Exception e) {
            /* Error while parsing import data: */
            CauseException ce = new CauseException(ResourceProviderME.get(
            "exc.err.imp", m_url), e);
      //#ifdef DLOGGING
//@      logger.severe(ce.getMessage(), e);
      //#endif
      if ((m_url != null) && m_url.startsWith("file://")) {
        System.err.println("Cannot process file.");
      }
            throw ce;
        } catch(OutOfMemoryError t) {
      m_feeds = null;
      System.gc();
      //#ifdef DLOGGING
//@      logger.severe("Out Of Memory Error with " + m_url, t);
      //#endif
      if ((m_url != null) && m_url.startsWith("file://")) {
        System.err.println("Cannot process file.");
      }
            /* Out Of Memory Error while parsing RSS data */
            throw new CauseMemoryException(ResourceProviderME.get(
            "exc.om.rsd", m_url), t);
        } catch(Throwable t) {
      //#ifdef DLOGGING
//@      logger.severe("parseFeeds error with " + m_url, t);
      //#endif
      if ((m_url != null) && m_url.startsWith("file://")) {
        System.err.println("Cannot process file.");
      }
            throw new CauseException(
          "Internal error while parsing RSS data " + m_url, t);
        } finally {
      super.handleClose();
    }
    }   
View Full Code Here

//@      logger.severe("parseRssFeedUrl error with " + url, e);
      //#endif
      if ((url != null) && url.startsWith("file://")) {
        System.err.println("Cannot process file.");
      }
            throw new CauseException("Error while parsing RSS data: "
                    + e.toString(), e);
    } catch (OutOfMemoryError e) {
      if (m_rssFeed != null) {
        m_rssFeed.setItems(null);
        m_rssFeed.setItems(new Vector());
      }
            CauseMemoryException ce =
          new CauseMemoryException("Out of memory error while " +
          "parsing RSS data: " + e.toString(), e);
      //#ifdef DLOGGING
//@      logger.severe(ce.getMessage(), e);
      //#endif
      if ((url != null) && url.startsWith("file://")) {
        System.err.println("Cannot process file.");
      }
            throw ce;
        } catch(Throwable t) {
      //#ifdef DLOGGING
//@      logger.severe("parseRssFeedUrl error with " + url, t);
      //#endif
      if ((url != null) && url.startsWith("file://")) {
        System.err.println("Cannot process file.");
      }
            throw new CauseException("Error while parsing RSS data: "
                + t.toString(), t);
        } finally {
      super.handleClose();
    }
    }
View Full Code Here

    } catch (CauseMemoryException e) {
      throw e;
    } catch (CauseException e) {
      throw e;
        } catch(Exception e) {
      CauseException ce = new CauseException(
          "Internal error during deserialize", e);
      //#ifdef DLOGGING
//@      Logger logger = Logger.getLogger("RssItunesFeed");
//@      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        } catch(OutOfMemoryError e) {
      CauseMemoryException ce = new CauseMemoryException(
          "Out of memory error during deserialize", e);
      //#ifdef DLOGGING
//@      Logger logger = Logger.getLogger("RssItunesFeed");
//@      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        } catch(Throwable e) {
      CauseException ce = new CauseException(
          "Internal error during deserialize", e);
      //#ifdef DLOGGING
//@      Logger logger = Logger.getLogger("RssItunesFeed");
//@      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        }
  }
View Full Code Here

    } catch (CauseMemoryException e) {
      throw e;
    } catch (CauseException e) {
      throw e;
        } catch(Exception e) {
      CauseException ce = new CauseException(
          "Internal error during initialize of RssItunesFeed", e);
      //#ifdef DLOGGING
//@      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        } catch(OutOfMemoryError e) {
      CauseMemoryException ce = new CauseMemoryException(
          "Out of memory error during initialize of RssItunesFeed", e);
      //#ifdef DLOGGING
//@      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        } catch(Throwable e) {
      CauseException ce = new CauseException(
          "Internal error during initialize of RssItunesFeed", e);
      //#ifdef DLOGGING
//@      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        }
    }
View Full Code Here

      } else if (cmd.getCommandType() == Command.CANCEL) {
        midlet.setCurrent(disp);
        return;
      }
    } catch (Throwable e) {
      final CauseException ce = new CauseException(
          "Unable to show alert.", e);
      //#ifdef DLOGGING
//@      logger.severe(ce.getMessage(), e);
      //#endif
      /** Error while parsing RSS feed */
      System.out.println(e.getClass().getName() + " " + ce.getMessage());
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of com.substanceofcode.utils.CauseException

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.