public final class ErrorEntity extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ErrorEntity.ErrorReason |
Constructor and Description |
---|
ErrorEntity(ErrorEntity.ErrorReason reason,
String message)
Constructs an error entity.
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage() |
ErrorEntity.ErrorReason |
getReason() |
static ErrorEntity |
of(Exception exception)
Creates appropriate error entity from the given exception.
|
public ErrorEntity(ErrorEntity.ErrorReason reason, String message)
reason
- reason for the error.message
- messagepublic ErrorEntity.ErrorReason getReason()
public String getMessage()
public static ErrorEntity of(Exception exception)
exception
- exception from which the ErrorEntity has to be created.Copyright © 2016 Atlassian. All rights reserved.