public class HL7Exception extends Exception
| Modifier and Type | Field and Description |
|---|---|
static int |
ACK_AA
Original mode: Application Accept - Enhanced mode: Application acknowledgment: Accept
|
static int |
ACK_AE
Original mode: Application Error - Enhanced mode: Application acknowledgment: Error
|
static int |
ACK_AR
Original mode: Application Reject - Enhanced mode: Application acknowledgment: Reject
|
static int |
ACK_CA
Enhanced mode: Accept acknowledgment: Commit Accept
|
static int |
ACK_CE
Enhanced mode: Accept acknowledgment: Commit Error
|
static int |
ACK_CR
Enhanced mode: Accept acknowledgment: Commit Reject
|
static int |
APPLICATION_INTERNAL_ERROR |
static int |
APPLICATION_RECORD_LOCKED |
static int |
DATA_TYPE_ERROR |
static int |
DUPLICATE_KEY_IDENTIFIER |
static int |
MESSAGE_ACCEPTED |
static int |
REQUIRED_FIELD_MISSING |
static int |
SEGMENT_SEQUENCE_ERROR |
static int |
TABLE_VALUE_NOT_FOUND |
static int |
UNKNOWN_KEY_IDENTIFIER |
static int |
UNSUPPORTED_EVENT_CODE |
static int |
UNSUPPORTED_MESSAGE_TYPE |
static int |
UNSUPPORTED_PROCESSING_ID |
static int |
UNSUPPORTED_VERSION_ID |
| Constructor and Description |
|---|
HL7Exception(String message)
Creates an HL7Exception with the code APPLICATION_INTERNAL_ERROR
|
HL7Exception(String message,
int errorCondition)
Creates an HL7Exception.
|
HL7Exception(String message,
int errorCondition,
Throwable cause)
Creates an HL7Exception.
|
HL7Exception(String message,
Throwable cause)
Creates an HL7Exception with the code APPLICATION_INTERNAL_ERROR
|
HL7Exception(Throwable cause)
Creates an HL7Exception with the code APPLICATION_INTERNAL_ERROR
|
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCode() |
int |
getFieldPosition()
Returns the field number within the segment where the error occured if it has been
set, -1 otherwise; numbering starts at 1.
|
String |
getMessage()
Overrides Throwable.getMessage() to add the field location of the problem if
available.
|
String |
getSegmentName()
Returns the name of the segment where the error occured, if this has been set
(null otherwise).
|
int |
getSegmentRepetition()
Returns the sequence number of the segment where the error occured (if there
are multiple segments with the same name) if this has been set, -1 otherwise -
numbering starts at 1.
|
void |
populate(Segment errorSegment,
String theJdbcUrl)
Populates the given error segment with information from this Exception.
|
void |
setFieldPosition(int fieldNum)
Sets the field number (within a segment) where the error occured; numbering
starts at 1.
|
void |
setSegmentName(String segmentName)
Sets the name of the segment where the error occured.
|
void |
setSegmentRepetition(int sequenceNum)
Sets the sequence number of the segment where the error occured if there
are multiplt segments with the same name (ie the sequenceNum'th segment
with the name specified in
setSegmentName). |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final int ACK_AA
public static final int ACK_AE
public static final int ACK_AR
public static final int ACK_CA
public static final int ACK_CE
public static final int ACK_CR
public static final int MESSAGE_ACCEPTED
public static final int SEGMENT_SEQUENCE_ERROR
public static final int REQUIRED_FIELD_MISSING
public static final int DATA_TYPE_ERROR
public static final int TABLE_VALUE_NOT_FOUND
public static final int UNSUPPORTED_MESSAGE_TYPE
public static final int UNSUPPORTED_EVENT_CODE
public static final int UNSUPPORTED_PROCESSING_ID
public static final int UNSUPPORTED_VERSION_ID
public static final int UNKNOWN_KEY_IDENTIFIER
public static final int DUPLICATE_KEY_IDENTIFIER
public static final int APPLICATION_RECORD_LOCKED
public static final int APPLICATION_INTERNAL_ERROR
public HL7Exception(String message, int errorCondition, Throwable cause)
errorCondition - a code describing the the error condition, from HL7
table 0357 (see section 2.16.8 of standard v 2.4) - HL7Exception defines
these codes as integer constants that can be used here (e.g.
HL7Exception.UNSUPPORTED_MESSAGE_TYPE)cause - The exception that caused this exception to be thrown.public HL7Exception(String message, int errorCondition)
errorCondition - a code describing the the error condition, from HL7
table 0357 (see section 2.16.8 of standard v 2.4) - HL7Exception defines
these codes as integer constants that can be used here (e.g.
HL7Exception.UNSUPPORTED_MESSAGE_TYPE)public HL7Exception(String message, Throwable cause)
cause - The excption that caused this exception tobe thrown.public HL7Exception(Throwable cause)
cause - The excption that caused this exception tobe thrown.public HL7Exception(String message)
public void setSegmentName(String segmentName)
public String getSegmentName()
public void setSegmentRepetition(int sequenceNum)
setSegmentName). Numbering
starts at 1.public int getSegmentRepetition()
public void setFieldPosition(int fieldNum)
public int getFieldPosition()
public int getErrorCode()
-1 if nonepublic String getMessage()
getMessage in class Throwablepublic void populate(Segment errorSegment, String theJdbcUrl) throws HL7Exception
HL7ExceptionCopyright © 2001-2012 University Health Network. All Rights Reserved.