Tabnine Logo
FieldException
Code IndexAdd Tabnine to your IDE (free)

How to use
FieldException
in
quickfix

Best Java code snippets using quickfix.FieldException (Showing top 20 results out of 315)

origin: quickfix-j/quickfixj

private void checkFirstFieldFound(boolean firstFieldFound, final int groupCountTag, final int firstField, int tag) throws FieldException {
  if (!firstFieldFound) {
    throw new FieldException(
        SessionRejectReason.REPEATING_GROUP_FIELDS_OUT_OF_ORDER, "The group " + groupCountTag
        + " must set the delimiter field " + firstField, tag);
  }
}
origin: org.quickfixj/quickfixj-all

/**
 * Returns the first invalid tag, which is all that can be reported
 * in the resulting FIX reject message.
 *
 * @return the first invalid tag
 */
int getInvalidTag() {
  return exception != null ? exception.getField() : 0;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

    if (message.isSetField(e.getField())) {
      if (rejectInvalidMessage) {
        throw e;
        getLog().onErrorEvent(
            "Warn: incoming message with incorrect field: "
                + message.getField(e.getField()) + ": " + message);
      } else {
        getLog().onErrorEvent(
            "Warn: incoming message with missing field: " + e.getField()
                + ": " + e.getMessage() + ": " + message);
  final String reason = SessionRejectReasonText.getMessage(e.getSessionRejectReason());
  final String errorMessage = "Invalid Logon message: " + reason + " (field " + e.getField() + ")";
  generateLogout(errorMessage);
  state.incrNextTargetMsgSeqNum();
  disconnect(errorMessage, true);
} else {
  generateReject(message, e.getSessionRejectReason(), e.getField());
origin: quickfix-j/quickfixj

if (message.isSetField(e.getField())) {
  if (rejectInvalidMessage) {
    throw e;
    getLog().onErrorEvent(
        "Warn: incoming message with incorrect field: "
            + message.getField(e.getField()) + ": " + getMessageToLog(message));
  } else {
    getLog().onErrorEvent(
        "Warn: incoming message with missing field: " + e.getField()
            + ": " + e.getMessage() + ": " + getMessageToLog(message));
origin: org.quickfixj/quickfixj-all

if (message.isSetField(e.getField())) {
  if (rejectInvalidMessage) {
    throw e;
    getLog().onErrorEvent(
        "Warn: incoming message with incorrect field: "
            + message.getField(e.getField()) + ": " + getMessageToLog(message));
  } else {
    getLog().onErrorEvent(
        "Warn: incoming message with missing field: " + e.getField()
            + ": " + e.getMessage() + ": " + getMessageToLog(message));
origin: org.quickfixj/quickfixj-all

private void checkFirstFieldFound(boolean firstFieldFound, final int groupCountTag, final int firstField, int tag) throws FieldException {
  if (!firstFieldFound) {
    throw new FieldException(
        SessionRejectReason.REPEATING_GROUP_FIELDS_OUT_OF_ORDER, "The group " + groupCountTag
        + " must set the delimiter field " + firstField, tag);
  }
}
origin: quickfix-j/quickfixj

/**
 * Returns the first invalid tag, which is all that can be reported
 * in the resulting FIX reject message.
 *
 * @return the first invalid tag
 */
int getInvalidTag() {
  return exception != null ? exception.getField() : 0;
}
origin: quickfix-j/quickfixj

/** Check if message type is defined in spec. **/
private void checkMsgType(String msgType) {
  if (!isMsgType(msgType)) {
    throw new FieldException(SessionRejectReason.INVALID_MSGTYPE, MsgType.FIELD);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

/**
 * Returns the first invalid tag, which is all that can be reported
 * in the resulting FIX reject message.
 *
 * @return the first invalid tag
 */
int getInvalidTag() {
  return exception != null ? exception.getField() : 0;
}
origin: quickfix-j/quickfixj

private FieldException newIncorrectDataException(FieldConvertError e, int tag) {
  return new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE,
      e.getMessage(), tag);
}
origin: org.quickfixj/quickfixj-all

/** Check if message type is defined in spec. **/
private void checkMsgType(String msgType) {
  if (!isMsgType(msgType)) {
    throw new FieldException(SessionRejectReason.INVALID_MSGTYPE, MsgType.FIELD);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

private void checkMsgType(String msgType) {
  if (!isMsgType(msgType)) {
    // It would be better to include the msgType in exception message
    // Doing that will break acceptance tests
    throw new FieldException(SessionRejectReason.INVALID_MSGTYPE);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

private FieldException newIncorrectDataException(FieldConvertError e, int tag) {
  return new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE,
      e.getMessage(), tag);
}
origin: org.quickfixj/quickfixj-all

private FieldException newIncorrectDataException(FieldConvertError e, int tag) {
  return new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE,
      e.getMessage(), tag);
}
origin: quickfix-j/quickfixj

/** Check if field tag number is defined in spec. **/
void checkValidTagNumber(Field<?> field) {
  if (!fields.contains(field.getTag())) {
    throw new FieldException(SessionRejectReason.INVALID_TAG_NUMBER, field.getField());
  }
}
origin: quickfix-j/quickfixj

/** Check if a field has a value. **/
private void checkHasValue(StringField field) {
  if (checkFieldsHaveValues && field.getValue().length() == 0) {
    throw new FieldException(SessionRejectReason.TAG_SPECIFIED_WITHOUT_A_VALUE,
        field.getField());
  }
}
origin: org.quickfixj/quickfixj-all

/** Check if field tag number is defined in spec. **/
void checkValidTagNumber(Field<?> field) {
  if (!fields.contains(field.getTag())) {
    throw new FieldException(SessionRejectReason.INVALID_TAG_NUMBER, field.getField());
  }
}
origin: org.quickfixj/quickfixj-all

/** Check if a field has a value. **/
private void checkHasValue(StringField field) {
  if (checkFieldsHaveValues && field.getValue().length() == 0) {
    throw new FieldException(SessionRejectReason.TAG_SPECIFIED_WITHOUT_A_VALUE,
        field.getField());
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

void checkValidTagNumber(Field<?> field) {
  if (!fields.contains(field.getTag())) {
    throw new FieldException(SessionRejectReason.INVALID_TAG_NUMBER, field.getField());
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.quickfix

private void checkHasValue(StringField field) {
  if (checkFieldsHaveValues && field.getValue().length() == 0) {
    throw new FieldException(SessionRejectReason.TAG_SPECIFIED_WITHOUT_A_VALUE,
        field.getField());
  }
}
quickfixFieldException

Most used methods

  • <init>
  • getField
  • getMessage
  • getSessionRejectReason

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
  • onCreateOptionsMenu (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now