Package io.ably.lib.types
Class ErrorInfo
- java.lang.Object
-
- io.ably.lib.types.ErrorInfo
-
public class ErrorInfo extends java.lang.ObjectAn exception type encapsulating error information containing an Ably-specific error code and generic status code.
-
-
Field Summary
Fields Modifier and Type Field Description intcodeAbly error code (see ably-common/protocol/errors.json)java.lang.StringhrefLink to specification detail for this error code, where available.java.lang.StringmessageAdditional message information, where availableintstatusCodeHTTP Status Code corresponding to this error, where applicable
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)static ErrorInfofromMsgpackBody(byte[] msgpack)static ErrorInfofromResponseStatus(java.lang.String statusLine, int statusCode)static ErrorInfofromThrowable(java.lang.Throwable throwable)java.lang.StringtoString()
-
-
-
Field Detail
-
code
public int code
Ably error code (see ably-common/protocol/errors.json)
-
statusCode
public int statusCode
HTTP Status Code corresponding to this error, where applicable
-
message
public java.lang.String message
Additional message information, where available
-
href
public java.lang.String href
Link to specification detail for this error code, where available. Spec TI4.
-
-
Constructor Detail
-
ErrorInfo
public ErrorInfo()
Public no-argument constructor for msgpack
-
ErrorInfo
public ErrorInfo(java.lang.String message, int code)Construct an ErrorInfo from message and code- Parameters:
message-code-
-
ErrorInfo
public ErrorInfo(java.lang.String message, int statusCode, int code)Generic constructor- Parameters:
message-statusCode-code-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
fromMsgpackBody
public static ErrorInfo fromMsgpackBody(byte[] msgpack) throws java.io.IOException
- Throws:
java.io.IOException
-
fromThrowable
public static ErrorInfo fromThrowable(java.lang.Throwable throwable)
-
fromResponseStatus
public static ErrorInfo fromResponseStatus(java.lang.String statusLine, int statusCode)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-