TimException

public class TimException : CustomStringConvertible

Contains information about a failed request or method call. Parameter provided in Errors.timException. Immutable class.

  • Create exception.

    Declaration

    Swift

    public init(resultCode: CResultCode)
  • Create exception.

    Declaration

    Swift

    public init(resultCode: CResultCode,
                errorMessage: String?,
                nativeError: NativeError?,
                ppInfo: PpInfo?,
                additionalErrorInfo: [String:String],
                printData: PrintData?,
                rejectedBasket: Basket?)
  • Create exception.

    Declaration

    Swift

    public init(resultCode: CResultCode,
                errorMessage: String? = nil,
                localizedMessage: String? = nil,
                nativeError: NativeError? = nil,
                ppInfo: PpInfo? = nil,
                additionalErrorInfo: [String:String]? = nil,
                printData: PrintData? = nil,
                rejectedBasket: Basket? = nil)
  • Contains the result code with the error.

    Declaration

    Swift

    public let resultCode: CResultCode
  • Returns the error message as transmitted from the terminal.

    The message language depends on the terminal but will generally be in English.

    An empty string is returned if the terminal does not send a message.

    Declaration

    Swift

    public let errorMessage: String?
  • Returns the localised error message in human readable form derived from the error code sent by the terminal.

    The message will be in the merchant language of the terminal provided systemInformation() has been executed (English otherwise).

    Declaration

    Swift

    public var localizedMessage: String { get }
  • Returns the localised error message in human readable form derived from the error code sent by the terminal.

    The message will be in the language supplied in the parameter.

    Valid language strings are currently: “en”,“de”,“de-AT”,“de-CH”,“fr”,“fr-BE”,“fr-CH”,“it”,“bg”, “hr”,“cs”,“nl”,“nl-BE”,“nl-NL”,“el”,“hu”,“lt”,“pl”,“pt”,“ro”,“sk”,“sl”,“es”,“sv”,“fi”,“no”,“da”

    “de” defaults to “de-CH” “fr” defaults to “fr-CH” “nl” defaults to “nl-BE”

    Declaration

    Swift

    public func localizedMessage(language: String) -> String
  • Native error if present or nil if not present.

    Declaration

    Swift

    public let nativeError: NativeError?
  • Payment protocol specific information. Mandatory if any information is given by the underlying payment protocol.

    Declaration

    Swift

    public let ppInfo: PpInfo?
  • Additional error information mapping item text to item text code. Mandatory if any additional error information available.

    Declaration

    Swift

    public let additionalErrorInfo: [String : String]
  • The tag can have two different payloads depending on how the receipt creation and printing is handled. If the terminal creates the receipts itself, PrintData only contains one or multiple tags. If the ECR wishes to create the receipts, the terminal can only send the required that are used in the receipts. This functionality is only available for transaction receipts, not for any admin receipts.

    Optional: Mandatory if declined receipts are enabled and any receipt data available.

    Declaration

    Swift

    public let printData: PrintData?
  • Rejected basket as modified by host or nil if absent. Used for CGuides.petrol only.

    Declaration

    Swift

    public let rejectedBasket: Basket?
  • Declaration

    Swift

    public let callStack: [String]
  • Textual representation.

    Declaration

    Swift

    public var description: String { get }