java.lang.Object
pro.verron.officestamper.preset.ExceptionResolvers
The ExceptionResolvers class provides a set of static factory methods to create different types of ExceptionResolver
implementations.
These resolvers are designed to handle exceptions that occur during the processing of placeholders in text
documents.
This class is a utility class and cannot be instantiated.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExceptionResolver
The defaulting resolver class will handle exceptions by returning an empty string.static ExceptionResolver
defaulting
(String value) The defaulting resolver class will handle exceptions by returning a default value.static ExceptionResolver
legacyBehavior
(boolean shouldFail, boolean emptyOnError, boolean shouldReplace, String replacementValue) Deprecated, for removal: This API element is subject to removal in a future version.static ExceptionResolver
passing()
The passing resolver will handle exceptions by returning the placeholder expression.static ExceptionResolver
throwing()
The throwing resolver will handle exceptions by immediately throwing an OfficeStamperException.
-
Method Details
-
passing
The passing resolver will handle exceptions by returning the placeholder expression. It logs the exception message, and the stack trace if tracing is enabled. -
defaulting
The defaulting resolver class will handle exceptions by returning an empty string. It logs the exception message, and the stack trace if tracing is enabled. -
defaulting
The defaulting resolver class will handle exceptions by returning a default value. It logs the exception message, and the stack trace if tracing is enabled. -
throwing
The throwing resolver will handle exceptions by immediately throwing an OfficeStamperException. It is used to propagate errors encountered during the processing of placeholders in text documents. -
legacyBehavior
@Deprecated(since="2.5", forRemoval=true) public static ExceptionResolver legacyBehavior(boolean shouldFail, boolean emptyOnError, boolean shouldReplace, String replacementValue) Deprecated, for removal: This API element is subject to removal in a future version.
-