{"record":{"id":"3fd24a98e4458785","repo":"alibaba/nacos","slug":"error-3fd24a","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"common/src/main/java/com/alibaba/nacos/common/utils/Preconditions.java","lineNumber":42,"sourceCode":" * @date 2021/7/29\n */\npublic class Preconditions {\n    \n    private Preconditions() {\n    }\n    \n    /**\n     * check precondition.\n     * @param expression a boolean expression\n     * @param errorMessage the exception message to use if the check fails\n     * @throws IllegalArgumentException if {@code expression} is false\n     */\n    public static void checkArgument(boolean expression, Object errorMessage) {\n        if (Objects.isNull(errorMessage)) {\n            throw new IllegalArgumentException(\"errorMessage cannot be null.\");\n        }\n        if (!expression) {\n            throw new IllegalArgumentException(String.valueOf(errorMessage));\n        }\n    }\n    \n    /**\n     * check precondition.\n     * @param expression a boolean expression\n     * @param errorMessageTemplate the exception message template to use if the check fails\n     * @param errorMessageArgs the arguments to be substituted into the message template.\n     * @throws IllegalArgumentException if {@code expression} is false\n     */\n    public static void checkArgument(boolean expression, String errorMessageTemplate,\n        Object... errorMessageArgs) {\n        if (Objects.isNull(errorMessageArgs) || Objects.isNull(errorMessageTemplate)) {\n            throw new IllegalArgumentException(\n                \"errorMessageTemplate or errorMessage cannot be null.\");\n        }\n        if (!expression) {\n            throw new IllegalArgumentException(","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/common/src/main/java/com/alibaba/nacos/common/utils/Preconditions.java#L24-L60","documentation":"Error \"{}\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at common/src/main/java/com/alibaba/nacos/common/utils/Preconditions.java:42 when the library encounters an invalid state.","commonSituations":"A Preconditions check failed with the supplied message.","solutions":["Review the input and runtime state for Preconditions check, correct the reported problem, and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}