public function withDetail($key, $message)
    {
        assert(!is_null($key), 'Key must not be null');
        assert(!is_null($message), 'Message must not be null');
        $this->details[strval($key)] = $message;

        return $this;
    }