{"record":{"id":"17d0440457cf60dc","repo":"NationalSecurityAgency/ghidra","slug":"missing-name-of-new-category","errorCode":null,"errorMessage":"Missing name of new category","messagePattern":"Missing name of new category","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java","lineNumber":941,"sourceCode":"\n\t\ttry (BulkSignatures bsim = getBulkSignatures()) {\n\t\t\tbsim.printMetadata();\n\t\t}\n\t}\n\n\t/**\n\t * Inserts a new category name into the BSim database. \n\t * \n\t * This variant of the install category method is intended for command-line\n\t * users. \n\t * \n\t * @param params the command-line params\n\t * @throws IOException if there's an error establishing the database connection\n\t * @throws LSHException if there's an error issuing the query\n\t */\n\tprivate void doInstallCategory(List<String> params) throws IOException, LSHException {\n\t\tif (params.size() < 1) {\n\t\t\tthrow new IllegalArgumentException(\"Missing name of new category\");\n\t\t}\n\t\tboolean dateOption = booleanOptions.contains(CATEGORY_DATE_OPTION);\n\n\t\tString categoryName = params.get(0);\n\n\t\tif (params.size() > 1) {\n\t\t\tthrow new IllegalArgumentException(\"Unexpected parameter: \" + params.get(1));\n\t\t}\n\n\t\ttry (BulkSignatures bsim = getBulkSignatures()) {\n\t\t\tbsim.installCategory(categoryName, dateOption);\n\t\t}\n\t}\n\n\t/**\n\t * Inserts a new function tag into the BSim database.\n\t * \n\t * This variant of the tag install method is intended for command-line","sourceCodeStart":923,"sourceCodeEnd":959,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java#L923-L959","documentation":"Thrown by doInstallCategory() when no positional category-name argument is supplied to addexecategory. The command inserts a new executable category into the BSim database and requires the category name as a mandatory positional token after the bsimURL.","triggerScenarios":"Running 'bsim addexecategory <bsimURL>' with no positional argument. params.size() < 1 at line 940.","commonSituations":"Forgetting the category name; quoting issue causing it to be consumed differently; a shell variable that expanded to empty.","solutions":["Append the category name: addexecategory <bsimURL> <category_name>.","Optionally add --date to make it a date-valued category.","Check usage at line 1028."],"exampleFix":"// before\nbsim addexecategory postgresql://myhost/BsimDB\n// after\nbsim addexecategory postgresql://myhost/BsimDB build_date --date","handlingStrategy":"validation","validationCode":"// addexecategory requires a positional category name\nif (\"addexecategory\".equals(command) && positionalParams.isEmpty()) {\n    throw new IllegalArgumentException(\"addexecategory requires a category name argument\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass a non-empty category name positional.","Check for empty shell variables before exec."],"tags":["cli","argument-validation","bsim","addexecategory"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}