Class SwiftException
Exception that is thrown by the SwiftReader in order to indicate SWIFT syntax errors.
Inheritance
Implements
Inherited Members
Namespace: Subsembly.Swift
Assembly: Subsembly.Sepa.dll
Syntax
public class SwiftException : Exception, ISerializable
Constructors
SwiftException(SwiftExceptionCode)
Create a new SwiftException.
Declaration
public SwiftException(SwiftExceptionCode nCode)
Parameters
Type | Name | Description |
---|---|---|
SwiftExceptionCode | nCode |
SwiftException(SwiftExceptionCode, SwiftField)
Create a new SwiftException.
Declaration
public SwiftException(SwiftExceptionCode nCode, SwiftField aField)
Parameters
Type | Name | Description |
---|---|---|
SwiftExceptionCode | nCode | |
SwiftField | aField |
SwiftException(SwiftExceptionCode, SwiftField, Int32, Exception)
Create a new SwiftException.
Declaration
public SwiftException(SwiftExceptionCode nCode, SwiftField aField, int nLine, Exception aInnerException)
Parameters
Type | Name | Description |
---|---|---|
SwiftExceptionCode | nCode | |
SwiftField | aField | |
System.Int32 | nLine | |
System.Exception | aInnerException |
SwiftException(SwiftExceptionCode, Int32)
Create a new SwiftException.
Declaration
public SwiftException(SwiftExceptionCode nCode, int nLine)
Parameters
Type | Name | Description |
---|---|---|
SwiftExceptionCode | nCode | |
System.Int32 | nLine |
Properties
Code
Provides the detailed exception code of this SwiftException.
Declaration
public SwiftExceptionCode Code { get; }
Property Value
Type | Description |
---|---|
SwiftExceptionCode | Refer to the documentation of the SwiftExceptionCode for a list of possible values and their meaning. |
Field
SwiftField instance that this exception refers to.
Declaration
public SwiftField Field { get; }
Property Value
Type | Description |
---|---|
SwiftField | If this exception was thrown due to a particular malformed SWIFT field, then
this property provides a reference to the SwiftField instance
that is in error. The exception code will be
MalformedFieldContent.
For other exceptions the Field property is |
Line
Provides the line number of the line in the SWIFT stream where the error occured.
Declaration
public int Line { get; }
Property Value
Type | Description |
---|---|
System.Int32 | Processing a SWIFT stream begins with the line number one. While the stream is read, the line number is incremented by every CRLF sequence, including '@@' sequences, if those are permitted. As all SWIFT messages should start with a CRLF right away, the very first SWIFT field already begins at line two. The value zero indicates that the line number is not known. This should never happen, however. |