[This is preliminary documentation and is subject to change.]
SifException describes a SIF error condition.
When handling inbound messages, the agent may throw a SifException from a
message handler to signal that an error has occurred and should be returned
to the ZIS in the SIF_Ack message. The Adk will convert the SifException to
a SIF_Error element when sending the associated SIF_Ack. It is desirable to
throw SifException in your message handlers (versus generic exceptions) if
you want control over setting the SIF_Error category, code, description, and
extended description elements.
SifException may also be thrown by Adk methods in response to a SIF_Ack
received from the server. The actual SIF_Ack object that generated the exception
can be retrieved by calling getAck. Any SIF_Error elements
included in the acknowledgement can be retrieved by calling getErrors
and associated methods such as hasError. Note SIF 1.0r1 allowed
for multiple SIF_Error elements per SIF_Ack, but later versions of SIF do
not. For backward compatibility, the Adk captures all SIF_Error elements
received in SIF_Ack messages and makes them available as an array. The array
can be obtained by calling the getErrors method.
| C# | Visual Basic | Visual C++ |
[SerializableAttribute] public class SifException : AdkMessagingException
<SerializableAttribute> _ Public Class SifException _ Inherits AdkMessagingException
[SerializableAttribute] public ref class SifException : public AdkMessagingException
| All Members | Constructors | Methods | Properties | ||
| Icon | Member | Description |
|---|---|---|
| SifExceptionSifExceptionNew(SIF_Ack, IZone) | Constructs an exception to wrap one or more SIF_Errors received from an
inbound SIF_Ack message. This form of constructor is only called by
the Adk.
| |
| SifExceptionSifExceptionNew(String, SIF_Ack, IZone) | Constructs an exception to wrap one or more SIF_Errors received from an
inbound SIF_Ack message. This form of constructor is only called by
the Adk.
| |
| SifExceptionSifExceptionNew(SifErrorCategoryCode, Int32, String, IZone) | Constructs a SifException for delivery to the ZIS. | |
| SifExceptionSifExceptionNew(SifErrorCategoryCode, Int32, String, IZone, Exception) | Constructs a SifException for delivery to the ZIS. | |
| SifExceptionSifExceptionNew(SifErrorCategoryCode, Int32, String, String, IZone) |
Constructs a SifException for delivery to the ZIS
| |
| SifExceptionSifExceptionNew(SifErrorCategoryCode, Int32, String, String, IZone, Exception) |
Constructs a SifException for delivery to the ZIS
| |
| Ack | ||
| Error | Gets all SIF_Errors wrapped by this exception | |
| ErrorCategory | Gets or sets the Error Category of the first SIF_Error element, or 0xFFFFFFFF
if there are no errors. If more than one SIF_Error is present, the
category code from the first error is returned.
| |
| ErrorCode | Gets the Error Code of the first SIF_Error element, or 0xFFFFFFFF
if there are no errors. If more than one SIF_Error is present, the
error code from the first error is returned.
| |
| ErrorDesc | Gets or Sets the error description of the first SIF_Error wrapped by this
exception. If no SIF_Errors are wrapped by this exception, a new one
is created.
| |
| ErrorExtDesc | Gets or Sets the optional extended error description of the first SIF_Error
wrapped by this exception. If no SIF_Errors are wrapped by this exception,
a new one is created.
| |
| HasError(SifErrorCategoryCode, Int32) | Determines if this SifException has an error with the specified category
and code. In some versions of SIF, a SifException may describe more than
one error. This method searches through all of the wrapped errors and
returns true if any match the category and code.
| |
| HasErrorCategory(SifErrorCategoryCode) | Determines if this SifException has an error with the specified category.
In some versions of SIF, a SifException may describe more than
one error. This method searches through all of the wrapped errors and
returns true if any match the category.
| |
| HasErrors | Determines if this SifException describes any SIF_Errors | |
| Message | (Overrides Exception.Message.) | |
| SetSIF_Error(Int32, Int32, String, String) | Sets the SIF_Error element associated with this exception. |