Package io.quarkus.qute
Class TemplateException.Builder
- java.lang.Object
-
- io.quarkus.qute.TemplateException.Builder
-
- Enclosing class:
- TemplateException
public static class TemplateException.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TemplateException.Builderargument(String key, Object value)The argument can be used in a message template set viamessage(String).TemplateException.Builderarguments(Object... arguments)Every empty expression{}in the message template is a placeholder that is replaced with an index-based array accessor{data[n]}wherenis the index of the placeholder.TemplateException.Builderarguments(Map<String,Object> arguments)TemplateExceptionbuild()TemplateException.Buildercause(Throwable cause)TemplateException.Buildercode(ErrorCode code)TemplateException.Buildermessage(String message)The message can be a qute template.TemplateException.Builderorigin(TemplateNode.Origin origin)If set then the origin key can be used in the message template.
-
-
-
Method Detail
-
message
public TemplateException.Builder message(String message)
The message can be a qute template.- Parameters:
message-- Returns:
- self
- See Also:
argument(String, Object)
-
cause
public TemplateException.Builder cause(Throwable cause)
-
origin
public TemplateException.Builder origin(TemplateNode.Origin origin)
If set then the origin key can be used in the message template. For exampleSome error {origin}will be rendered asSomer error template [foo.html] line 1.- Parameters:
origin-- Returns:
- self
-
code
public TemplateException.Builder code(ErrorCode code)
-
argument
public TemplateException.Builder argument(String key, Object value)
The argument can be used in a message template set viamessage(String).- Parameters:
key-value-- Returns:
- self
-
arguments
public TemplateException.Builder arguments(Map<String,Object> arguments)
-
arguments
public TemplateException.Builder arguments(Object... arguments)
Every empty expression{}in the message template is a placeholder that is replaced with an index-based array accessor{data[n]}wherenis the index of the placeholder. The first placeholder is replace with{data[0]}, the second with{data[1]}, and so on. For example,"Hello {}!"becomesHello {data[0]}!.- Parameters:
arguments-- Returns:
- self
-
build
public TemplateException build()
-
-