Package com.ooyala.pulse
Class Error
- java.lang.Object
-
- com.ooyala.pulse.Error
-
public class Error extends java.lang.Object
Wraps information on errors when they occur.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Error.Core
Core error codes.static class
Error.Domain
The possible error domains.static class
Error.Omid
Omid error codes.static class
Error.Request
Request error codes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCode()
Gets the error code of this error.java.lang.String
getDomain()
Gets the domain of this error.java.lang.String
getMessage()
Gets the error message for this error.java.lang.String
toString()
-
-
-
Constructor Detail
-
Error
public Error(java.lang.String message)
Instantiate an Error object with the USER domain. Its code will be 0 and the provided message will be used.- Parameters:
message
- The error message to use.
-
Error
public Error(java.lang.String domain, int code, java.lang.String message)
Instantiate an Error object.- Parameters:
domain
- The error's domain.code
- The error's code.message
- The error's message.
-
-
Method Detail
-
getDomain
public java.lang.String getDomain()
Gets the domain of this error.- Returns:
- The domain of this error.
- See Also:
Error.Domain
-
getCode
public int getCode()
Gets the error code of this error.- Returns:
- The error code of this error.
- See Also:
Error.Core
,Error.Request
-
getMessage
public java.lang.String getMessage()
Gets the error message for this error.- Returns:
- A textual description of the error that occurred.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-