{"record":{"id":"bcedc130853dd5b8","repo":"quarkusio/quarkus","slug":"expresion-command-is-reserved-command","errorCode":null,"errorMessage":"Expresion command is reserved: \" + command","messagePattern":"Expresion command is reserved: \" \\+ command","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/qute/core/src/main/java/io/quarkus/qute/ParserConfig.java","lineNumber":30,"sourceCode":" */\npublic record ParserConfig(Character expressionCommand) {\n\n    /**\n     * By default, no special expression command is used.\n     */\n    public static final ParserConfig DEFAULT = new ParserConfig(null);\n\n    public ParserConfig {\n        if (expressionCommand != null) {\n            char command = expressionCommand.charValue();\n            if (command < 0 || command > 127) {\n                throw new IllegalArgumentException(\"Expresion command must be an ASCII char: \" + command);\n            }\n            if (Parser.Tag.isCommand(command, null)\n                    || command == Parser.COMMENT_DELIMITER\n                    || command == Parser.CDATA_START_DELIMITER\n                    || command == Parser.UNDERSCORE) {\n                throw new IllegalArgumentException(\"Expresion command is reserved: \" + command);\n            }\n            if (Character.isDigit(command)\n                    || Character.isAlphabetic(command)) {\n                throw new IllegalArgumentException(\"Expresion command must not be a digit/alphabetic: \" + command);\n            }\n        }\n    }\n\n}","sourceCodeStart":12,"sourceCodeEnd":39,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/qute/core/src/main/java/io/quarkus/qute/ParserConfig.java#L12-L39","documentation":"Thrown by ParserConfig when the expression command character collides with a character already reserved by the Qute parser: any command character of a built-in Tag (via Parser.Tag.isCommand), the comment delimiter, the CDATA start delimiter, or underscore. Such a char would make template syntax ambiguous.","triggerScenarios":"Constructing ParserConfig with an expression command equal to e.g. '@' or '#' or '[' or '_' (characters used for other tag kinds), or the default '{' itself.","commonSituations":"Users trying to unify delimiters (e.g. wanting all tags to start with '#'), not realizing comment/CDATA/section commands already consume that character; blindly swapping '{' for another common symbol.","solutions":["Pick a character not used by any Qute tag command, comment (!), CDATA ([), or underscore (_), e.g. '$'.","Check the chosen char against Parser.Tag.isCommand(char, null) plus Parser.COMMENT_DELIMITER, CDATA_START_DELIMITER and UNDERSCORE before configuring.","If you need different section delimiters too, configure them separately rather than overloading the expression command."],"exampleFix":"// before\nParserConfig config = new ParserConfig('#'); // reserved: tag command\n\n// after\nParserConfig config = new ParserConfig('$'); // free ASCII char","handlingStrategy":"validation","validationCode":"char c = command;\nboolean reserved = Parser.Tag.isCommand(c, null)\n        || c == Parser.COMMENT_DELIMITER\n        || c == Parser.CDATA_START_DELIMITER\n        || c == Parser.UNDERSCORE;\nif (reserved) {\n    throw new IllegalArgumentException(\"expression command is reserved: \" + c);\n}","typeGuard":null,"tryCatchPattern":"try {\n    ParserConfig config = new ParserConfig(command);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"reserved\")) {\n        // pick a different, non-reserved char and retry configuration\n    }\n}","preventionTips":["Check the char against Parser.Tag.isCommand, COMMENT_DELIMITER, CDATA_START_DELIMITER and UNDERSCORE before configuring","Prefer known-safe chars like '$'","Do not try to unify the expression command with section/comment delimiters"],"tags":["qute","configuration","illegal-argument","delimiter"],"backgroundTag":"invalid-delimiter-char","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}