Package ca.eandb.util

Examples of ca.eandb.util.UnexpectedException


      Field field = state.getClass().getField(fieldName);
      Object value = getOptionValue(argq);
      field.set(state, value);
    } catch (NoSuchFieldException e) {
      e.printStackTrace();
      throw new UnexpectedException(e);
    } catch (IllegalAccessException e) {
      e.printStackTrace();
      throw new UnexpectedException(e);
    }
  }
View Full Code Here


      });
    } catch (IOException e) {
      throw e;
    } catch (Exception e) {
      throw new UnexpectedException(e);
    }

    zs.close();

  }
View Full Code Here

  /**
   * Creates a <code>Win32PowerCourtesyMonitor</code>.
   */
  public Win32PowerCourtesyMonitor() {
    if (!Platform.isWindows()) {
      throw new UnexpectedException("This class requires Windows");
    }
    monitor = new PowerBroadcastMonitor();
    update();
  }
View Full Code Here

      /*
       * This should not happen, getEntryNameForKey should ensure that
       * the URL is valid.
       */
      e.printStackTrace();
      throw new UnexpectedException(e);

    } catch (IOException e) {

      /* Could not delete the entry. */
      e.printStackTrace();
View Full Code Here

      return new EntrySet(service.getNames(baseUrl));

    } catch (MalformedURLException e) {

      e.printStackTrace();
      throw new UnexpectedException(e);

    } catch (IOException e) {

      e.printStackTrace();
View Full Code Here

      SecretKeyFactory f = SecretKeyFactory.getInstance(algorithm);

      return f.generateSecret(spec).getEncoded();

    } catch (InvalidKeySpecException e) {
      throw new UnexpectedException(e);
    } catch (NoSuchAlgorithmException e) {
      throw new UnexpectedException(e);
    }
  }
View Full Code Here

      byte[] salt = new byte[8];
      random.nextBytes(salt);

      return salt;
    } catch (NoSuchAlgorithmException e) {
      throw new UnexpectedException(e);
    }
  }
View Full Code Here

  /**
   * Creates a new <code>OSXPowerCourtesyMonitor</code>.
   */
  public OSXPowerCourtesyMonitor() {
    if (!Platform.isMac()) {
      throw new UnexpectedException("This class requires Mac OS");
    }
    update();
    // TODO Start a thread to receive events when the power status changes.
  }
View Full Code Here

    return getLightPathLength() + getEyePathLength() + 1;
  }

  public Point2 getPointOnImagePlane() {
    if (eyeTail == null) {
      throw new UnexpectedException();
    } else if (eyeTail.getParent() == null) {
      EyeNode eyeNode = (EyeNode) eyeTail;

      return eyeNode.project(lightTail.getPosition());
    } else { // eyeTail != null && eyeTail.getParent() != null
View Full Code Here

        }
        break;
      }

      default:
        throw new UnexpectedException("Invalid level mode.");
      }
      source.seek(source.getFlushedPosition() + 8 * numTiles);
      source.flush();

      throw new UnimplementedException();
View Full Code Here

TOP

Related Classes of ca.eandb.util.UnexpectedException

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.