beautypg.com

Exceptions, Readercommexception, Readercodeexception – ThingMagic Mercury API v1.23.0 User Manual

Page 33: Readerparseexception, Readerfatalexception

background image

Exceptions

Level 1 API

33

Exceptions

In the event of an error, methods of this interface may throw a

ReaderException, which

will contain a string describing the error. Several subtypes exist:

ReaderCommException

This exception is used in the event of a detected failure of the underlying communication
mechanism (timeout, network fault, CRC error, etc). This class includes a method:

byte[] getReaderMessage()

that returns the message where the failure was detected.

ReaderCodeException

This exception is used for errors reported from the reader device. The class includes a
method:

int getCode()

that returns the numeric error code reported by the device. This code can be very useful
to ThingMagic Support when debugging a problem.

See the reader specific Hardware Guide for details on the error codes returned.

ReaderParseException

This exception is used when a message was successfully received from the device, but
the format could not be understood by the API.

ReaderFatalException

This exception is used in the event of an error in the device or API that cannot be
recovered from. All device operations will fail after reception of this exception. This
exception indicates a potentially damaging situation has occurred, or the reader is
damaged, and the reader has reset.

In the event of receiving a

ReaderFatalException error from a reader device, the

message returned with the exception will be included in the exception string, in ASCII