{"record":{"id":"6fb4d60adb4420d8","repo":"opendataloader-project/opendataloader-pdf","slug":"option-s-unsupported-value-s-supported-val-6fb4d6","errorCode":null,"errorMessage":"Option --%s: unsupported value '%s'. Supported values: memory, disk","messagePattern":"Option --(.+?): unsupported value '(.+?)'\\. Supported values: memory, disk","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/api/cli/CLIOptions.java","lineNumber":741,"sourceCode":"            if (value != null && !value.trim().isEmpty()) {\n                String normalized = value.trim().toLowerCase(Locale.ROOT);\n                if (!HybridConfig.OCR_OFF.equals(normalized)\n                        && !HybridConfig.OCR_AUTO.equals(normalized)\n                        && !HybridConfig.OCR_FORCE.equals(normalized)) {\n                    throw new IllegalArgumentException(String.format(\n                            \"Option --%s: unsupported value '%s'. Supported values: %s, %s, %s\",\n                            HYBRID_HANCOM_AI_OCR_STRATEGY_LONG_OPTION, normalized,\n                            HybridConfig.OCR_OFF, HybridConfig.OCR_AUTO, HybridConfig.OCR_FORCE));\n                }\n                config.getHybridConfig().setOcrStrategy(normalized);\n            }\n        }\n        if (commandLine.hasOption(HYBRID_HANCOM_AI_IMAGE_CACHE_LONG_OPTION)) {\n            String value = commandLine.getOptionValue(HYBRID_HANCOM_AI_IMAGE_CACHE_LONG_OPTION);\n            if (value != null && !value.trim().isEmpty()) {\n                String normalized = value.trim().toLowerCase(Locale.ROOT);\n                if (!\"memory\".equals(normalized) && !\"disk\".equals(normalized)) {\n                    throw new IllegalArgumentException(String.format(\n                            \"Option --%s: unsupported value '%s'. Supported values: memory, disk\",\n                            HYBRID_HANCOM_AI_IMAGE_CACHE_LONG_OPTION, normalized));\n                }\n                config.getHybridConfig().setImageCache(normalized);\n            }\n        }\n        if (commandLine.hasOption(HYBRID_HANCOM_AI_SAVE_CROPS_LONG_OPTION)) {\n            config.getHybridConfig().setSaveCrops(true);\n        }\n        if (commandLine.hasOption(HYBRID_HANCOM_AI_CROP_OUTPUT_DIR_LONG_OPTION)) {\n            String value = commandLine.getOptionValue(HYBRID_HANCOM_AI_CROP_OUTPUT_DIR_LONG_OPTION);\n            if (value != null && !value.trim().isEmpty()) {\n                config.getHybridConfig().setCropOutputDir(value.trim());\n            }\n        }\n        if (commandLine.hasOption(TO_STDOUT_LONG_OPTION)) {\n            config.setOutputStdout(true);\n        }","sourceCodeStart":723,"sourceCodeEnd":759,"githubUrl":"https://github.com/opendataloader-project/opendataloader-pdf/blob/a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8/java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/api/cli/CLIOptions.java#L723-L759","documentation":"Thrown when --hybrid-hancom-ai-image-cache receives a value that is neither memory nor disk. Unlike most other hybrid options, these two literals are hardcoded inline (not exposed as HybridConfig constants), so the message is static rather than generated from a set. The option selects the page-image cache backing for the hancom-ai backend and requires --hybrid=hancom-ai. Default is memory.","triggerScenarios":"Pass `--hybrid-hancom-ai-image-cache mem`, `--hybrid-hancom-ai-image-cache ram`, `--hybrid-hancom-ai-image-cache ssd`, or `--hybrid-hancom-ai-image-cache DISK` (lowercased first, so case is fine, but the synonym must be exact).","commonSituations":"Using abbreviations (mem/ram) instead of the full token; guessing storage tiers (ssd); assuming the constants are exposed elsewhere.","solutions":["Use `memory` or `disk`.","Ensure `--hybrid=hancom-ai` is set.","Omit the flag to keep the default (memory)."],"exampleFix":"// before\nopendataloader-pdf doc.pdf --hybrid hancom-ai --hybrid-hancom-ai-image-cache mem\n// after\nopendataloader-pdf doc.pdf --hybrid hancom-ai --hybrid-hancom-ai-image-cache memory","handlingStrategy":"validation","validationCode":"String n = value.trim().toLowerCase(Locale.ROOT);\nif (!\"memory\".equals(n) && !\"disk\".equals(n)) {\n    throw new IllegalArgumentException(\"Bad image-cache value: \" + value);\n}","typeGuard":"boolean isAcceptableImageCache(String v) {\n    String n = v.trim().toLowerCase(Locale.ROOT);\n    return \"memory\".equals(n) || \"disk\".equals(n);\n}","tryCatchPattern":"try {\n    CLIOptions.applyAllTo(config, cmd);\n} catch (IllegalArgumentException e) {\n    System.err.println(e.getMessage());\n    System.exit(2);\n}","preventionTips":["Use the full tokens memory/disk; abbreviations like mem/ram are rejected.","Default is memory; omit the flag unless you need disk-backed caching.","Only meaningful with --hybrid=hancom-ai."],"tags":["cli","hybrid","hancom-ai","validation","enum-value"],"backgroundTag":null,"analyzedSha":"a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8","analyzedAt":"2026-08-14T05:22:03.953Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}