{"record":{"id":"6d66322f4c0c63ef","repo":"Seldaek/monolog","slug":"the-given-message-type-s-is-not-supported","errorCode":null,"errorMessage":"The given message type \"%s\" is not supported","messagePattern":"The given message type \"(.+?)\" is not supported","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/ErrorLogHandler.php","lineNumber":47,"sourceCode":"\n    /** @var 0|4 */\n    protected int $messageType;\n    protected bool $expandNewlines;\n\n    /**\n     * @param 0|4 $messageType    Says where the error should go.\n     * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries\n     *\n     * @throws \\InvalidArgumentException If an unsupported message type is set\n     */\n    public function __construct(int $messageType = self::OPERATING_SYSTEM, int|string|Level $level = Level::Debug, bool $bubble = true, bool $expandNewlines = false)\n    {\n        parent::__construct($level, $bubble);\n\n        if (false === \\in_array($messageType, self::getAvailableTypes(), true)) {\n            $message = sprintf('The given message type \"%s\" is not supported', print_r($messageType, true));\n\n            throw new \\InvalidArgumentException($message);\n        }\n\n        $this->messageType = $messageType;\n        $this->expandNewlines = $expandNewlines;\n    }\n\n    /**\n     * @return int[] With all available types\n     */\n    public static function getAvailableTypes(): array\n    {\n        return [\n            self::OPERATING_SYSTEM,\n            self::SAPI,\n        ];\n    }\n\n    /**","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/ErrorLogHandler.php#L29-L65","documentation":"Error \"The given message type \"%s\" is not supported\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/ErrorLogHandler.php:47 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":"57eb1028342134e701e77c617565d51b6e5a2a53","analyzedAt":"2026-08-17T02:36:30.259Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}