Package de.lmu.ifi.dbs.elki.utilities.exceptions

Examples of de.lmu.ifi.dbs.elki.utilities.exceptions.AbortException


      }
      // the last one caused the page to overflow.
      leafCapacity = cap - 1;
    }
    catch(IOException e) {
      throw new AbortException("Error determining page sizes.", e);
    }

    /* Simulate the creation of a directory page to get the capacity */
    try {
      int cap = 0;
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      HyperBoundingBox hb = new HyperBoundingBox(new double[exampleLeaf.getDimensionality()], new double[exampleLeaf.getDimensionality()]);
      SpatialDirectoryEntry sl = new SpatialDirectoryEntry(0, hb);
      while(baos.size() <= getPageSize()) {
        sl.writeExternal(oos);
        oos.flush();
        cap++;
      }
      dirCapacity = cap - 1;
    }
    catch(IOException e) {
      throw new AbortException("Error determining page sizes.", e);
    }

    if(dirCapacity <= 1) {
      throw new IllegalArgumentException("Node size of " + getPageSize() + " Bytes is chosen too small!");
    }
View Full Code Here


    // find the leaf node containing o
    IndexTreePath<DeLiCluEntry> pathToObject = findPathToObject(getRootPath(), obj, id);

    if(pathToObject == null) {
      throw new AbortException("Object not found in setHandled.");
    }

    // set o handled
    DeLiCluEntry entry = pathToObject.getLastPathComponent().getEntry();
    entry.setHasHandled(true);
View Full Code Here

  public static <C> C parameterizeOrAbort(Class<?> c, Parameterization config) {
    try {
      return tryInstantiate((Class<C>) c, c, config);
    }
    catch(Exception e) {
      throw new AbortException("Instantiation failed", e);
    }
  }
View Full Code Here

    this.index = index;
  }

  @Override
  public List<DistanceResultPair<D>> getRKNNForObject(O obj, int k) {
    throw new AbortException("Preprocessor KNN query only supports ID queries.");
  }
View Full Code Here

      catch(FileNotFoundException e2) {
        try {
          stream = FileUtil.openSystemFile(DEFAULT_PROPERTIES_PATH + filename + DEFAULT_PROPERTIES_EXTENSION);
        }
        catch(FileNotFoundException e3) {
          throw new AbortException("Could not find style scheme file '" + filename + "' for scheme '" + name + "'!");
        }
      }
    }
    try {
      properties.load(stream);
    }
    catch(Exception e) {
      throw new AbortException("Error loading properties file " + filename + ".\n", e);
    }
  }
View Full Code Here

    if(lw == null) {
      try {
        lw = Double.parseDouble(getPropertyValue(key, LINE_WIDTH)) * SCALE;
      }
      catch(NullPointerException e) {
        throw new AbortException("Missing/invalid value in style library: " + key + "." + LINE_WIDTH);
      }
    }
    return lw;
  }
View Full Code Here

    if(lw == null) {
      try {
        lw = Double.parseDouble(getPropertyValue(key, TEXT_SIZE)) * SCALE;
      }
      catch(NullPointerException e) {
        throw new AbortException("Missing/invalid value in style library: " + key + "." + TEXT_SIZE);
      }
    }
    return lw;
  }
View Full Code Here

    if(lw == null) {
      try {
        lw = Double.parseDouble(getPropertyValue(key, GENERIC_SIZE)) * SCALE;
      }
      catch(NullPointerException e) {
        throw new AbortException("Missing/invalid value in style library: " + key + "." + GENERIC_SIZE);
      }
    }
    return lw;
  }
View Full Code Here

    if(lw == null) {
      try {
        lw = Double.parseDouble(getPropertyValue(key, OPACITY));
      }
      catch(NullPointerException e) {
        throw new AbortException("Missing/invalid value in style library: " + key + "." + OPACITY);
      }
    }
    return lw;
  }
View Full Code Here

        in.close();

        return store;
      }
      catch(IOException e) {
        throw new AbortException("Loading of external neighborhood failed.", e);
      }
    }
View Full Code Here

TOP

Related Classes of de.lmu.ifi.dbs.elki.utilities.exceptions.AbortException

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.