Package com.ibm.icu.message2
Enum MessageFormatter.ErrorHandlingBehavior
- java.lang.Object
-
- java.lang.Enum<MessageFormatter.ErrorHandlingBehavior>
-
- com.ibm.icu.message2.MessageFormatter.ErrorHandlingBehavior
-
- All Implemented Interfaces:
Serializable
,Comparable<MessageFormatter.ErrorHandlingBehavior>
- Enclosing class:
- MessageFormatter
public static enum MessageFormatter.ErrorHandlingBehavior extends Enum<MessageFormatter.ErrorHandlingBehavior>
Determines how the formatting errors will be handled at runtime.Parsing errors and data model errors always throw and will not be affected by this setting.
But resolution errors and formatting errors will either try to fallback (if possible) or throw, depending on this setting.Used in conjunction with the
MessageFormatter.Builder.setErrorHandlingBehavior(MessageFormatter.ErrorHandlingBehavior)
method.- Status:
- Draft ICU 78.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BEST_EFFORT
Suppress errors and return best-effort output.STRICT
Signal allMessageFormat
errors by throwing aRuntimeException
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MessageFormatter.ErrorHandlingBehavior
valueOf(String name)
Returns the enum constant of this type with the specified name.static MessageFormatter.ErrorHandlingBehavior[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BEST_EFFORT
public static final MessageFormatter.ErrorHandlingBehavior BEST_EFFORT
Suppress errors and return best-effort output.- Status:
- Draft ICU 78.
-
STRICT
public static final MessageFormatter.ErrorHandlingBehavior STRICT
Signal allMessageFormat
errors by throwing aRuntimeException
.- Status:
- Draft ICU 78.
-
-
Method Detail
-
values
public static MessageFormatter.ErrorHandlingBehavior[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MessageFormatter.ErrorHandlingBehavior c : MessageFormatter.ErrorHandlingBehavior.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MessageFormatter.ErrorHandlingBehavior valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-