|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
ca.uhn.hl7v2.HL7Exception
public class HL7Exception
Represents an exception encountered while processing an HL7 message.
Field Summary | |
---|---|
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 Summary | |
---|---|
HL7Exception(java.lang.String message)
Creates an HL7Exception with the code APPLICATION_INTERNAL_ERROR |
|
HL7Exception(java.lang.String message,
int errorCondition)
Creates an HL7Exception. |
|
HL7Exception(java.lang.String message,
int errorCondition,
java.lang.Throwable cause)
Creates an HL7Exception. |
|
HL7Exception(java.lang.String message,
java.lang.Throwable cause)
Creates an HL7Exception with the code APPLICATION_INTERNAL_ERROR |
|
HL7Exception(java.lang.Throwable cause)
Creates an HL7Exception with the code APPLICATION_INTERNAL_ERROR |
Method Summary | |
---|---|
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. |
java.lang.String |
getMessage()
Overrides Throwable.getMessage() to add the field location of the problem if available. |
java.lang.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,
java.lang.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(java.lang.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 ). |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public 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
Constructor Detail |
---|
public HL7Exception(java.lang.String message, int errorCondition, java.lang.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 excption that caused this exception tobe thrown.public HL7Exception(java.lang.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(java.lang.String message, java.lang.Throwable cause)
cause
- The excption that caused this exception tobe thrown.public HL7Exception(java.lang.Throwable cause)
cause
- The excption that caused this exception tobe thrown.public HL7Exception(java.lang.String message)
Method Detail |
---|
public void setSegmentName(java.lang.String segmentName)
public java.lang.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 java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public void populate(Segment errorSegment, java.lang.String theJdbcUrl) throws HL7Exception
HL7Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |