Package com.xero.api

Class XeroApiException

  • All Implemented Interfaces:
    Serializable

    public class XeroApiException
    extends XeroException
    Legacy XeroApiException general exception class for returning exception details
    See Also:
    Serialized Form
    • Constructor Detail

      • XeroApiException

        public XeroApiException​(int responseCode)
        Init Xero API Exception
        Parameters:
        responseCode - int of the status code returned by the API
      • XeroApiException

        public XeroApiException​(int responseCode,
                                String message,
                                Exception e)
        Init Xero API Exception
        Parameters:
        responseCode - int of the status code returned by the API
        message - String details about the exception
        e - Exception the original exception thrown
      • XeroApiException

        public XeroApiException​(int responseCode,
                                Map<String,​String> map)
        Init Xero API Exception
        Parameters:
        responseCode - int of the status code returned by the API
        map - Map<String, String> array of details about the exception
      • XeroApiException

        public XeroApiException​(int responseCode,
                                Error error,
                                Exception e)
        Init Xero API Exception
        Parameters:
        responseCode - int of the status code returned by the API
        error - Error details about the exception
        e - Exception the original exception thrown
      • XeroApiException

        public XeroApiException​(int responseCode,
                                String message,
                                Error error,
                                Exception e)
        Init Xero API Exception
        Parameters:
        responseCode - int of the status code returned by the API
        message - String details about the exception
        error - Error details about the exception
        e - Exception the original exception thrown
    • Method Detail

      • getResponseCode

        public int getResponseCode()
        Init Xero API Exception
        Returns:
        int of the status code returned by the API
      • getMessage

        public String getMessage()
        Init Xero API Exception
        Overrides:
        getMessage in class Throwable
        Returns:
        String with the details about the exception
      • getMessages

        public Map<String,​String> getMessages()
        Init Xero API Exception
        Returns:
        Map<String, String> array of messages about the exception
      • getError

        public Error getError()
        Init Xero API Exception
        Returns:
        Error object with information about the exception