quarkusio/quarkus · error · IllegalArgumentException
Expresion command must not be a digit/alphabetic: " + comman
Error message
Expresion command must not be a digit/alphabetic: " + command
What it means
Thrown by ParserConfig when the expression command character is a digit or alphabetic character. Expression commands must be punctuation so that identifiers/numbers starting templates remain unambiguous.
Source
Thrown at independent-projects/qute/core/src/main/java/io/quarkus/qute/ParserConfig.java:34
* By default, no special expression command is used.
*/
public static final ParserConfig DEFAULT = new ParserConfig(null);
public ParserConfig {
if (expressionCommand != null) {
char command = expressionCommand.charValue();
if (command < 0 || command > 127) {
throw new IllegalArgumentException("Expresion command must be an ASCII char: " + command);
}
if (Parser.Tag.isCommand(command, null)
|| command == Parser.COMMENT_DELIMITER
|| command == Parser.CDATA_START_DELIMITER
|| command == Parser.UNDERSCORE) {
throw new IllegalArgumentException("Expresion command is reserved: " + command);
}
if (Character.isDigit(command)
|| Character.isAlphabetic(command)) {
throw new IllegalArgumentException("Expresion command must not be a digit/alphabetic: " + command);
}
}
}
}View on GitHub (pinned to e1c734241f)
Solutions
- Use a non-alphanumeric, non-digit ASCII punctuation character such as '$'.
- Validate before constructing: reject if Character.isDigit(c) || Character.isAlphabetic(c).
- If a letter-like look is desired, use a symbol adjacent in meaning, e.g. '$' or '%'.
Example fix
// before
ParserConfig config = new ParserConfig('e'); // alphabetic not allowed
// after
ParserConfig config = new ParserConfig('$'); // punctuation is allowed Defensive patterns
Strategy: validation
Validate before calling
char c = command;
if (Character.isDigit(c) || Character.isAlphabetic(c)) {
throw new IllegalArgumentException("expression command must be punctuation, got: " + c);
} Type guard
static boolean isPunctuation(char c) {
return c > 32 && c < 127 && !Character.isDigit(c) && !Character.isAlphabetic(c);
} Try / catch
try {
ParserConfig config = new ParserConfig(command);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("digit/alphabetic")) {
// substitute a punctuation char such as '$'
}
} Prevention
- Only allow punctuation characters as the expression command
- Reject letters/digits at the configuration boundary
- Document the constraint wherever the delimiter is configurable
When it happens
Trigger: Constructing ParserConfig with e.g. 'x', 'e', or '1' as the expression command — Character.isDigit or Character.isAlphabetic returns true.
Common situations: Users trying a mnemonic delimiter like 'e' for expression or a numeric char; programmatic config generation accidentally passing a letter from a string like "expr".
Related errors
- Expresion command must be an ASCII char: " + command
- Expresion command is reserved: " + command
- Unknown JAR package type '${value}'
- Unable to resolve locale: ${value}
- Unsupported compressor '
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/77f9dae62c4a6e85.
Report an issue: GitHub.