public function add(callable $callback)
    {
        $reflection = new \ReflectionFunction($callback);

        $params = $reflection->getParameters();
        if (empty($params)) {
            throw new \InvalidArgumentException(
                "Invalid exception callback: Has no arguments. Expected at least one."
            );
        }

        // Read the type hinted class for the first parameter
        $class = $params[0]->getClass();

        if ($class === null) {
            throw new \InvalidArgumentException(
                "Invalid exception callback: The first argument must have a class type hint."
            );
        }

        $this->callbacks[$class->name] = $callback;
    }