{"record":{"id":"0ece01d470398128","repo":"phacility/phabricator","slug":"ex-getmessage-0ece01","errorCode":null,"errorMessage":"$ex->getMessage()","messagePattern":"\\$ex->getMessage\\(\\)","errorType":"validation","errorClass":"PhabricatorConfigValidationException","httpStatus":null,"severity":"error","filePath":"src/applications/config/option/PhabricatorApplicationConfigOptions.php","lineNumber":34,"sourceCode":"      return;\n    }\n\n    if ($value === null) {\n      return;\n    }\n\n    $type = $option->newOptionType();\n    if ($type) {\n      try {\n        $type->validateStoredValue($option, $value);\n        $this->didValidateOption($option, $value);\n      } catch (PhabricatorConfigValidationException $ex) {\n        throw $ex;\n      } catch (Exception $ex) {\n        // If custom validators threw exceptions other than validation\n        // exceptions, convert them to validation exceptions so we repair the\n        // configuration and raise an error.\n        throw new PhabricatorConfigValidationException($ex->getMessage());\n      }\n\n      return;\n    }\n\n    if ($option->isCustomType()) {\n      try {\n        return $option->getCustomObject()->validateOption($option, $value);\n      } catch (Exception $ex) {\n        throw new PhabricatorConfigValidationException($ex->getMessage());\n      }\n    } else {\n      throw new Exception(\n        pht(\n          'Unknown configuration option type \"%s\".',\n          $option->getType()));\n    }\n","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/config/option/PhabricatorApplicationConfigOptions.php#L16-L52","documentation":"Normalization wrapper in the base config option validator: a custom validator threw a non-validation exception while checking the stored value. It is converted into a PhabricatorConfigValidationException so the configuration repair pipeline can surface and recover from the bad value; the original message is preserved via $ex->getMessage().","triggerScenarios":"Thrown at src/applications/config/option/PhabricatorApplicationConfigOptions.php:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped message to see which custom validation failed","Fix the stored configuration value for the offending option","If config is broken at startup, use bin/config to repair or delete the bad key"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}