public final class ErrorBuilder extends Object
Error instances.| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.api.message.Error |
build()
Creates the instance of
Error with the supplied configuration. |
static ErrorBuilder |
builder() |
static ErrorBuilder |
builder(Throwable e) |
ErrorBuilder |
description(String description)
Sets the description of the error.
|
ErrorBuilder |
detailedDescription(String detailedDescription)
Sets a detailed description of the error.
|
ErrorBuilder |
errorMessage(org.mule.runtime.api.message.Message errorMessage)
Sets the error message for the error.
|
ErrorBuilder |
errorType(org.mule.runtime.api.message.ErrorType errorType)
Sets the error type of this error.
|
ErrorBuilder |
exception(Throwable exception)
Sets the exception that causes the error.
|
public static ErrorBuilder builder()
public static ErrorBuilder builder(Throwable e)
public ErrorBuilder exception(Throwable exception)
Error.getCause()exception - the exception that caused the errorthis builderpublic ErrorBuilder description(String description)
description - the descriptionthis builderpublic ErrorBuilder detailedDescription(String detailedDescription)
detailedDescription - the detailed descriptionthis builderpublic ErrorBuilder errorType(org.mule.runtime.api.message.ErrorType errorType)
ErrorType.errorType - the error typethis builderpublic ErrorBuilder errorMessage(org.mule.runtime.api.message.Message errorMessage)
Message with information related to the error. For instance, a response from an http:request
operation may return a 4XX status code. The content for the whole response can be set in the error message so the information
is available during the error handler execution.errorMessage - public org.mule.runtime.api.message.Error build()
Error with the supplied configuration.
All builder parameters are required except for the error message which may be null.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.