Class COPException

  • All Implemented Interfaces:
    java.io.Serializable

    public class COPException
    extends java.lang.Exception
    Class for handling a HTTP response of the Cloud Office Print server when the responseCode is /= 200. Has 4 variables responseCode, URID, userMessage and messageForSupport.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      COPException​(int responseCode, java.lang.String error)
      Sets this.responseCode to responseCode.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessageForSupport()  
      int getResponseCode()  
      java.lang.String getURID()  
      java.lang.String getUserMessage()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • COPException

        public COPException​(int responseCode,
                            java.lang.String error)
        Sets this.responseCode to responseCode. Parses the given response error to get URID, userMessage, messageForSupport.
        Parameters:
        responseCode - responseCode of the HTTP response of the Cloud Office Print server.
        error - text of the HTTP response (error) of the Cloud Office Print server.
    • Method Detail

      • getResponseCode

        public int getResponseCode()
        Returns:
        The response code of the HTTP response.
      • getURID

        public java.lang.String getURID()
        Returns:
        URID of the error.
      • getMessageForSupport

        public java.lang.String getMessageForSupport()
        Returns:
        Encrypted message to give to the Cloud Office Print support for help.
      • getUserMessage

        public java.lang.String getUserMessage()
        Returns:
        Message for the user explaining where the errors does come form.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable
        Returns:
        A string representation of the error containing the response code and a message for the user.