public final class GenericErrorDetail extends InternalErrorDetail<GenericErrorDetail> implements java.io.Serializable
errorId
Constructor and Description |
---|
GenericErrorDetail(ErrorId errorId,
java.lang.String message,
java.util.List<java.lang.Object> sources,
java.lang.Throwable cause) |
Modifier and Type | Method and Description |
---|---|
void |
formatDetail(java.util.List<ErrorDetail<?>> mergeableErrors,
java.util.Formatter formatter)
Formats the detail of this error message along with other errors that are mergeable with this
error.
|
GenericErrorDetail |
withSources(java.util.List<java.lang.Object> newSources)
Returns a new instance of the same
ErrorDetail with updated sources. |
getErrorIdentifier, getLearnMoreLink
equals, format, getCause, getMessage, getSources, hashCode, isMergeable
public GenericErrorDetail(ErrorId errorId, java.lang.String message, java.util.List<java.lang.Object> sources, java.lang.Throwable cause)
public void formatDetail(java.util.List<ErrorDetail<?>> mergeableErrors, java.util.Formatter formatter)
ErrorDetail
ErrorDetail.format(int, java.util.List<com.google.inject.spi.ErrorDetail<?>>, java.util.Formatter)
.
mergeableErrors
is a list that contains all other errors that are reported in the
same exception that are considered to be mergable with this error base on result of calling
ErrorDetail.isMergeable(com.google.inject.spi.ErrorDetail<?>)
. The list will be empty if non of the other errors are mergable with this
error.
formatDetail
in class ErrorDetail<GenericErrorDetail>
mergeableErrors
- list of errors that are mergeable with this errorformatter
- for printing the error messagepublic GenericErrorDetail withSources(java.util.List<java.lang.Object> newSources)
ErrorDetail
ErrorDetail
with updated sources.withSources
in class ErrorDetail<GenericErrorDetail>