Class TimException

  • All Implemented Interfaces:
    Serializable

    public class TimException
    extends Exception
    Contains information about a failed request or method call. For synchronous method calls TimException is thrown as exception. For asynchronous method calls TimException is included in the TimEvent. Immutable class.
    See Also:
    Serialized Form
    • Method Detail

      • getErrorMessage

        public String getErrorMessage()
        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.
      • getLocalizedMessage

        public String getLocalizedMessage()
        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).
        Overrides:
        getLocalizedMessage in class Throwable
      • getLocalizedMessage

        public String getLocalizedMessage​(String language)
        Returns the localized 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"
      • getMessage

        @Deprecated
        public String getMessage()
        Deprecated.
        Returns the error message as transmitted from the terminal. Internally this method calls getErrorMessage(). It is deprecated and only here for historical reasons.
        Overrides:
        getMessage in class Throwable
      • getResultCode

        public ResultCode getResultCode()
        Contains the result code with the error.
      • getNativeError

        public NativeError getNativeError()
        Native error if present.
      • getPpInfo

        public PpInfo getPpInfo()
        Payment protocol specific information.
      • getAdditionalErrorInfo

        public Map<String,​String> getAdditionalErrorInfo()
        Additional error information mapping error text to error type.
      • getPrintData

        public PrintData getPrintData()
        Print data, e.g. with declined receipt.
      • setPrintData

        public void setPrintData​(PrintData printData)
        Set print data. Used only to replace print data after formatting receipts.
      • getRejectedBasket

        public Basket getRejectedBasket()
        Rejected basket as modified by host or null if absent. Used for Guides.PETROL only.
      • toString

        public String toString()
        String representation for debugging purpose.
        Overrides:
        toString in class Throwable