blob: 4f156548f1d1b4c477b3de168ead1c56e8eb9f87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/quic/web_transport_error.h"
#include "base/strings/strcat.h"
namespace net {
std::string WebTransportErrorToString(const WebTransportError& error) {
std::string message =
ExtendedErrorToString(error.net_error, error.quic_error);
if (error.details == message)
return message;
return base::StrCat({message, " (", error.details, ")"});
}
std::ostream& operator<<(std::ostream& os, const WebTransportError& error) {
os << WebTransportErrorToString(error);
return os;
}
} // namespace net
|