com.canoris.api.exception
Class CanorisException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.canoris.api.exception.CanorisException
- All Implemented Interfaces:
- java.io.Serializable
public class CanorisException
- extends java.lang.Exception
CanorisException is thrown when a JsonParseException occurs.
We wrap the JsonParseException and extract the HTTP error code
from the HttpResponse object. Essentially this is the only
meaningful part of the response in case of an error.
- Author:
- stelios
- See Also:
- Serialized Form
Constructor Summary |
CanorisException(int code,
java.lang.String message)
Parameterized constructor. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CanorisException
public CanorisException(int code,
java.lang.String message)
- Parameterized constructor.
- Parameters:
code
- The HTTP error codemessage
- The HTTP error message
setHttpErrorCode
public void setHttpErrorCode(int httpErrorCode)
getHttpErrorCode
public int getHttpErrorCode()
setHttpErrorMessage
public void setHttpErrorMessage(java.lang.String httpErrorMessage)
getHttpErrorMessage
public java.lang.String getHttpErrorMessage()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Throwable