Package co.arago.hiro.client.exceptions
Class HiroHttpException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- co.arago.hiro.client.exceptions.HiroException
-
- co.arago.hiro.client.exceptions.HiroHttpException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AuthenticationTokenException
public class HiroHttpException extends HiroException
a base exception for HIRO, contains an error code- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HiroHttpException(java.lang.String message, int code, java.lang.String body)Constructs a new exception with the specified detail message.HiroHttpException(java.lang.String message, int code, java.lang.String body, java.lang.Throwable cause)Constructs a new exception with the specified detail message and cause.HiroHttpException(java.lang.String message, int code, java.lang.String body, java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace)Constructs a new exception with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBody()get the bodyintgetCode()get the error codejava.lang.StringtoString()
-
-
-
Constructor Detail
-
HiroHttpException
public HiroHttpException(java.lang.String message, int code, java.lang.String body)Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call toThrowable.initCause(java.lang.Throwable).- Parameters:
message- the detail message. The detail message is saved for later retrieval by theThrowable.getMessage()method.code- The code for the error (Similar to a HTTP status code).body- The body - if any.
-
HiroHttpException
public HiroHttpException(java.lang.String message, int code, java.lang.String body, java.lang.Throwable cause)Constructs a new exception with the specified detail message and cause.Note that the detail message associated with
causeis not automatically incorporated in this exception's detail message.- Parameters:
message- the detail message (which is saved for later retrieval by theThrowable.getMessage()method).code- The code for the error (Similar to a HTTP status code).body- The body - if any.cause- the cause (which is saved for later retrieval by theThrowable.getCause()method). (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)- Since:
- 1.4
-
HiroHttpException
public HiroHttpException(java.lang.String message, int code, java.lang.String body, java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace)Constructs a new exception with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.- Parameters:
message- the detail message.code- The code for the error (Similar to a HTTP status code).body- The body - if any.cause- the cause. (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)enableSuppression- whether or not suppression is enabled or disabledwritableStackTrace- whether or not the stack trace should be writable- Since:
- 1.7
-
-