Package net.sf.regain

Examples of net.sf.regain.RegainException


        termCount = writeTermsSimply(termEnum, writer);
      }

      mLog.info("Wrote " + termCount + " terms into " + termFile.getAbsolutePath());
    } catch (IOException exc) {
      throw new RegainException("Writing term file failed", exc);
    } finally {
      if (reader != null) {
        try {
          reader.close();
        } catch (IOException exc) {
View Full Code Here


    try {
      FileOutputStream out = new FileOutputStream(NEEDSUPDATE_FILE);
      out.close();
    }
    catch (IOException exc) {
      throw new RegainException("Creating needsupdate file failed", exc);
    }
   
    // Force a new check
    mCheckThread.interrupt();
   
View Full Code Here

        String regex = mHtmlParserUrlPatternArr[i].getRegexPattern();
        try {
          mHtmlParserPatternReArr[i] = new RE(regex);
        }
        catch (RESyntaxException exc) {
          throw new RegainException("Regular exception of HTML parser pattern #"
            + (i + 1) + " has a wrong syntax: '" + regex + "'", exc);
        }
      }
    }
    accountPasswordStore = new HashMap<String, AccountPasswordEntry>();
View Full Code Here

    if (thr instanceof HttpStreamException) {
      HttpStreamException exc = (HttpStreamException) thr;
      return exc.isHttpReturnCodeFromDeadLink();
    }
    else if (thr instanceof RegainException) {
      RegainException exc = (RegainException) thr;
      return isExceptionFromDeadLink(exc.getCause());
    }
    else {
      return false;
    }
  }
View Full Code Here

    File[] childArr = dir.listFiles();

    // dir.listFiles() can return null, because of "(Access denied)" / "(Zugriff verweigert)"
  if (childArr == null) {
    if (dir.canRead() == false) {
      throw new RegainException("canRead() on file returned: false. Maybe no access rights for sourceURL: " + sourceUrl);
    } else {
      throw new RegainException("listFiles() returned: null array. Maybe no access rights for sourceURL: " + sourceUrl);
    }
  }

    for (int childIdx = 0; childIdx < childArr.length; childIdx++) {
      // Get the URL for the current child file
View Full Code Here

          // It's a file -> Add a index job
          addJob(url, sourceUrl, false, true, null);
        }
      }
    } catch( Exception ex ) {
      throw new RegainException(ex.getMessage(), ex);
    }
        
  }
View Full Code Here

        addJob(folderUrl + newFolder, folderUrl, true, false, null);
      }
      imapStore.close();

    } catch (Exception ex) {
      throw new RegainException("Couldn't determine IMAP entries.", ex);
    }
  }
View Full Code Here

            // Add the job
            addJob(url, parentUrl, shouldBeParsed, shouldBeIndexed, linkText);
          }
        }
      } catch( Throwable ex ) {
        throw new RegainException("Too many links in document.", ex);
       
      }
    }
  }
View Full Code Here

    String regex = "\\." + extention + "$";
    try {
      return new RE(regex, RE.MATCH_CASEINDEPENDENT);
    } catch (RESyntaxException exc) {
      throw new RegainException("Creating accept regex for preparator failed: "
              + regex, exc);
    }
  }
View Full Code Here

    String urlRegex = buffer.toString();
    try {
      return new RE(urlRegex, RE.MATCH_CASEINDEPENDENT);
    } catch (RESyntaxException exc) {
      throw new RegainException("Creating accept regex for preparator failed: "
              + urlRegex, exc);
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.regain.RegainException

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.