Package com.opengamma

Examples of com.opengamma.OpenGammaRuntimeException


        IOUtils.closeQuietly(in);
        IOUtils.closeQuietly(out);
      }
      zipFile.close();
    } catch (IOException ex) {
      throw new OpenGammaRuntimeException("Error while extracting file: " + zipFile.getName() + " to: " + outputDir, ex);
    }
  }
View Full Code Here


      case MONTH_START_LINEAR:
        return "month_start_linear";
      case NONE:
        return "none";
      default:
        throw new OpenGammaRuntimeException("unexpected value " + value);
    }
  }
View Full Code Here

      // do nothing
    }

    @Override
    public void logError(String message) {
      throw new OpenGammaRuntimeException(message);
    }
View Full Code Here

      throw new OpenGammaRuntimeException(message);
    }

    @Override
    public void logError(Throwable throwable) {
      throw new OpenGammaRuntimeException(throwable.getMessage(), throwable);
    }
View Full Code Here

      } else if (runCreationMode.equalsIgnoreCase("create_new_overwrite")) {
        return RunCreationMode.CREATE_NEW_OVERWRITE;
      } else if (runCreationMode.equalsIgnoreCase("reuse_existing")) {
        return RunCreationMode.REUSE_EXISTING;
      } else {
        throw new OpenGammaRuntimeException("Unrecognized runCreationMode. " +
          "Should be one of AUTO, ALWAYS, NEVER. " +
          "Was " + runCreationMode);
      }
    } else {
      return null;
View Full Code Here

    URI vpBase;
    try {
      vpBase = new URI(engineURI);
    } catch (URISyntaxException ex) {
      throw new OpenGammaRuntimeException("Invalid URI", ex);
    }

    ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(brokerURL);
    activeMQConnectionFactory.setWatchTopicAdvisories(false);
View Full Code Here

  }

  /* package */ Frequency toFrequency() {
    final Frequency f = SimpleFrequencyFactory.INSTANCE.getFrequency(getName());
    if (f == null) {
      throw new OpenGammaRuntimeException("Bad value for frequencyBean (" + getName() + ")");
    }
    return f;
  }
View Full Code Here

      _parser.setFunction("Security", "get", MarketDataELFunctions.class.getMethod("getSecurity", Object.class));
      _parser.setFunction("FX", "isRate", MarketDataELFunctions.class.getMethod("isFXRate", Object.class));
      _parser.setFunction("FX", "multiplier", MarketDataELFunctions.class.getMethod("getFXMultiplier", Object.class, Double.TYPE));
      CommonSynthetics.configureParser(_parser);
    } catch (final Exception ex) {
      throw new OpenGammaRuntimeException("Caught", ex);
    }
  }
View Full Code Here

        yieldCurveNames.add(deserializer.fieldValueToObject(String.class, yieldCurveNamesFields.get(i)));
      }
      final List<FudgeField> instrumentExposuresCurveNameField = message.getAllByName(INSTRUMENT_EXPOSURES_CURVE_NAME_FIELD);
      final List<FudgeField> instrumentExposuresForCurve = message.getAllByName(INSTRUMENT_EXPOSURES_FOR_CURVE_FIELD);
      if (instrumentExposuresCurveNameField.size() != instrumentExposuresForCurve.size()) {
        throw new OpenGammaRuntimeException("Should never happen");
      }
      LinkedHashMap<String, CurveInstrumentConfig> curveInstrumentExposures = null;
      if (message.hasField(INSTRUMENT_EXPOSURES_CURVE_NAME_FIELD)) {
        curveInstrumentExposures = new LinkedHashMap<String, CurveInstrumentConfig>();
        for (int i = 0; i < instrumentExposuresCurveNameField.size(); i++) {
          final String curveName = deserializer.fieldValueToObject(String.class, instrumentExposuresCurveNameField.get(i));
          final CurveInstrumentConfig config = deserializer.fieldValueToObject(CurveInstrumentConfig.class, instrumentExposuresForCurve.get(i));
          curveInstrumentExposures.put(curveName, config);
        }
      }
      if (message.hasField(EXOGENOUS_DATA_FIELD)) {
        final List<FudgeField> exogenousConfigFields = message.getAllByName(EXOGENOUS_DATA_FIELD);
        final List<FudgeField> exogenousCurveFields = message.getAllByName(EXOGENOUS_CONFIG_FIELD);
        if (exogenousConfigFields.size() != exogenousCurveFields.size()) {
          throw new OpenGammaRuntimeException("Should never happen");
        }
        final LinkedHashMap<String, String[]> exogenousConfig = new LinkedHashMap<String, String[]>();
        for (int i = 0; i < exogenousConfigFields.size(); i++) {
          final String configName = deserializer.fieldValueToObject(String.class, exogenousConfigFields.get(i));
          final List<FudgeField> curveNamesField = ((FudgeMsg) exogenousCurveFields.get(i).getValue()).getAllByName(PER_CONFIG_FIELD);
View Full Code Here

  private InterestRateFutureSecurity getInterestRateFuture(final RateFutureNode rateFuture, final InterestRateFutureConvention futureConvention,
                                                           final Double price) {
    final String expiryCalculatorName = futureConvention.getExpiryConvention().getValue();
    final IborIndexConvention indexConvention = _conventionSource.getConvention(IborIndexConvention.class, rateFuture.getUnderlyingConvention());
    if (indexConvention == null) {
      throw new OpenGammaRuntimeException("Underlying convention was null");
    }
    final Period indexTenor = rateFuture.getUnderlyingTenor().getPeriod();
    final double paymentAccrualFactor = indexTenor.toTotalMonths() / 12.; //TODO don't use this method
    final Currency currency = indexConvention.getCurrency();
    final Calendar fixingCalendar = CalendarUtils.getCalendar(_regionSource, _holidaySource, indexConvention.getFixingCalendar());
View Full Code Here

TOP

Related Classes of com.opengamma.OpenGammaRuntimeException

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.