Package com.exasol.errorreporting
Class ErrorMessageBuilder
- java.lang.Object
-
- com.exasol.errorreporting.ErrorMessageBuilder
-
public class ErrorMessageBuilder extends Object
Builder for Exasol error messages.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorMessageBuildermessage(String message)Add exception message.ErrorMessageBuildermitigation(String mitigation)Add a mitigation.ErrorMessageBuilderparameter(String placeholder, Object value)Add a parameter.ErrorMessageBuilderparameter(String placeholder, Object value, String description)Add a parameter.StringtoString()Build the error message.ErrorMessageBuilderunquotedParameter(String placeholder, Object value)Add a parameter without quotes.ErrorMessageBuilderunquotedParameter(String placeholder, Object value, String description)Add a parameter without quotes.
-
-
-
Method Detail
-
message
public ErrorMessageBuilder message(String message)
Add exception message.If this method is called multiple times, the message is appended.
- Parameters:
message- exception message- Returns:
- self for fluent programming
-
parameter
public ErrorMessageBuilder parameter(String placeholder, Object value)
Add a parameter. This method quotes the parameter.You can use the parameter in message and mitigation using
{{parameter}}.- Parameters:
placeholder- placeholder without parenthesesvalue- value to insert- Returns:
- self for fluent programming
-
parameter
public ErrorMessageBuilder parameter(String placeholder, Object value, String description)
Add a parameter. This method quotes the parameter.You can use the parameter in message and mitigation using
{{parameter}}.- Parameters:
placeholder- placeholder without parenthesesvalue- value to insertdescription- description for the error catalog- Returns:
- self for fluent programming
-
unquotedParameter
public ErrorMessageBuilder unquotedParameter(String placeholder, Object value)
Add a parameter without quotes.- Parameters:
placeholder- placeholder without parenthesesvalue- value to insert- Returns:
- self for fluent programming
-
unquotedParameter
public ErrorMessageBuilder unquotedParameter(String placeholder, Object value, String description)
Add a parameter without quotes.- Parameters:
placeholder- placeholder without parenthesesvalue- value to insertdescription- description for the error catalog- Returns:
- self for fluent programming
-
mitigation
public ErrorMessageBuilder mitigation(String mitigation)
Add a mitigation. Explain here what users can do to resolve or avoid this error.- Parameters:
mitigation- explanation- Returns:
- self for fluent programming
-
-