public static function create($code, $message = null, $category = null)
    {
        return new class($message, $code, $category) extends ControlledError
        {
            /**
             * @var string
             */
            protected $category;

            /**
             * @param string $message
             * @param string $code
             * @param null   $category
             */
            public function __construct($message, $code, $category = null)
            {
                if ($category) {
                    $this->category = $category;
                }
                parent:: __construct($message, $code);
            }

            /**
             * @return string
             */
            public function getCategory(): string
            {
                return $this->category ?? parent::getCategory();
            }
        };
    }