{"record":{"id":"fa2a2dcfe3025435","repo":"phacility/phabricator","slug":"ex-getmessage","errorCode":null,"errorMessage":"$ex->getMessage()","messagePattern":"\\$ex->getMessage\\(\\)","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php","lineNumber":90,"sourceCode":"    if (empty($options[$key])) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Configuration key \"%s\" is unknown. Use \"bin/config list\" to list '.\n          'all known keys.',\n          $key));\n    }\n\n    $option = $options[$key];\n\n    $type = $option->newOptionType();\n    if ($type) {\n      try {\n        $value = $type->newValueFromCommandLineValue(\n          $option,\n          $value);\n        $type->validateStoredValue($option, $value);\n      } catch (PhabricatorConfigValidationException $ex) {\n        throw new PhutilArgumentUsageException($ex->getMessage());\n      }\n    } else {\n      // NOTE: For now, this handles both \"wild\" values and custom types.\n      $type = $option->getType();\n      switch ($type) {\n        default:\n          $value = json_decode($value, true);\n          if (!is_array($value)) {\n            switch ($type) {\n              default:\n                $message = pht(\n                  'Configuration key \"%s\" is of type \"%s\". Specify it in JSON.',\n                  $key,\n                  $type);\n                break;\n            }\n            throw new PhutilArgumentUsageException($message);\n          }","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php#L72-L108","documentation":"Error \"$ex->getMessage()\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}