{"record":{"id":"53e51642347486d8","repo":"opendataloader-project/opendataloader-pdf","slug":"unsupported-table-method-s-supported-values-53e516","errorCode":null,"errorMessage":"Unsupported table method '%s'. Supported values: %s","messagePattern":"Unsupported table method '(.+?)'\\. Supported values: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/api/cli/CLIOptions.java","lineNumber":511,"sourceCode":"    }\n\n    private static void applyPagesOption(Config config, CommandLine commandLine) {\n        if (commandLine.hasOption(PAGES_LONG_OPTION)) {\n            config.setPages(commandLine.getOptionValue(PAGES_LONG_OPTION));\n        }\n    }\n\n    private static void applyTableMethodOption(Config config, CommandLine commandLine) {\n        if (commandLine.hasOption(TABLE_METHOD_LONG_OPTION)) {\n            String methodValue = commandLine.getOptionValue(TABLE_METHOD_LONG_OPTION);\n            if (methodValue == null || methodValue.trim().isEmpty()) {\n                throw new IllegalArgumentException(\n                        String.format(\"Option --table-method requires a value. Supported values: %s\",\n                                Config.getTableMethodOptions(\", \")));\n            }\n            String method = methodValue.trim().toLowerCase(Locale.ROOT);\n            if (!Config.isValidTableMethod(method)) {\n                throw new IllegalArgumentException(\n                        String.format(\"Unsupported table method '%s'. Supported values: %s\",\n                                method, Config.getTableMethodOptions(\", \")));\n            }\n            config.setTableMethod(method);\n        }\n    }\n\n    private static void applyContentSafetyOption(Config config, CommandLine commandLine) {\n        if (!commandLine.hasOption(CONTENT_SAFETY_OFF_LONG_OPTION)) {\n            return;\n        }\n\n        String[] optionValues = commandLine.getOptionValues(CONTENT_SAFETY_OFF_LONG_OPTION);\n        if (optionValues == null || optionValues.length == 0) {\n            throw new IllegalArgumentException(\n                    \"Option --content-safety-off requires at least one value. Supported values: all, hidden-text, off-page, tiny, hidden-ocg\");\n        }\n","sourceCodeStart":493,"sourceCodeEnd":529,"githubUrl":"https://github.com/opendataloader-project/opendataloader-pdf/blob/a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8/java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/api/cli/CLIOptions.java#L493-L529","documentation":"Thrown when --table-method receives a non-empty value that is not in the table-method domain. The value is trimmed and lowercased, then checked via Config.isValidTableMethod against {default, cluster}; any other string is rejected with both the bad value and the full supported list. The cluster method combines border-based and cluster-based detection.","triggerScenarios":"Pass `--table-method lattic`, a typo like `defualt` or `defult`, or an anticipated-but-unimplemented name like `--table-method ml` or `--table-method border`.","commonSituations":"Typos; assuming a value from an older/newer version or a different tool; docs that mention an internal codename rather than the CLI token.","solutions":["Use `default` or `cluster`.","Check the exact supported list printed in the error (it is generated at runtime from Config).","Remove the flag for the default behavior."],"exampleFix":"// before\nopendataloader-pdf doc.pdf --table-method border\n// after\nopendataloader-pdf doc.pdf --table-method default","handlingStrategy":"type-guard","validationCode":"String m = userValue.trim().toLowerCase(Locale.ROOT);\nif (!Config.isValidTableMethod(m)) {\n    throw new IllegalArgumentException(\n        \"Unsupported table method '\" + userValue + \"'. Use: \" + Config.getTableMethodOptions(\", \"));\n}","typeGuard":"boolean isAcceptableTableMethod(String v) {\n    return v != null && Config.isValidTableMethod(v.trim().toLowerCase(Locale.ROOT));\n}","tryCatchPattern":"try {\n    config.setTableMethod(m);\n} catch (IllegalArgumentException e) {\n    config.setTableMethod(Config.TABLE_METHOD_DEFAULT);\n}","preventionTips":["Only default and cluster exist; do not guess other names.","Lowercase via Locale.ROOT before validating to match the library.","Generate help text from Config.getTableMethodOptions."],"tags":["cli","table-method","validation","enum-value"],"backgroundTag":null,"analyzedSha":"a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8","analyzedAt":"2026-08-14T05:22:03.953Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}