Enum TemplateException.ErrorCodes
- java.lang.Object
-
- java.lang.Enum<TemplateException.ErrorCodes>
-
- com.microsoft.semantickernel.templateengine.semantickernel.TemplateException.ErrorCodes
-
- All Implemented Interfaces:
Serializable,Comparable<TemplateException.ErrorCodes>
- Enclosing class:
- TemplateException
public static enum TemplateException.ErrorCodes extends Enum<TemplateException.ErrorCodes>
Error codes forTemplateException.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FUNCTION_NOT_FOUNDThe template requires an unknown function.RUNTIME_ERRORThe template execution failed, e.g.SYNTAX_ERRORSyntax error, the template syntax used is not valid.UNEXPECTED_BLOCK_TYPEThe block type produced be the tokenizer was not expected.UNKNOWN_ERRORUnknown error.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()Gets the message for the error code.static TemplateException.ErrorCodesvalueOf(String name)Returns the enum constant of this type with the specified name.static TemplateException.ErrorCodes[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN_ERROR
public static final TemplateException.ErrorCodes UNKNOWN_ERROR
Unknown error.
-
SYNTAX_ERROR
public static final TemplateException.ErrorCodes SYNTAX_ERROR
Syntax error, the template syntax used is not valid.
-
UNEXPECTED_BLOCK_TYPE
public static final TemplateException.ErrorCodes UNEXPECTED_BLOCK_TYPE
The block type produced be the tokenizer was not expected.
-
FUNCTION_NOT_FOUND
public static final TemplateException.ErrorCodes FUNCTION_NOT_FOUND
The template requires an unknown function.
-
RUNTIME_ERROR
public static final TemplateException.ErrorCodes RUNTIME_ERROR
The template execution failed, e.g. a function call threw an exception.
-
-
Method Detail
-
values
public static TemplateException.ErrorCodes[] 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 (TemplateException.ErrorCodes c : TemplateException.ErrorCodes.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TemplateException.ErrorCodes 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
-
getMessage
public String getMessage()
Gets the message for the error code.- Returns:
- The error code message
-
-