OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/inspector_protocol/ErrorSupport.h" | |
6 | |
7 #include "platform/inspector_protocol/String16.h" | |
8 | |
9 namespace blink { | 5 namespace blink { |
10 namespace protocol { | 6 namespace protocol { |
11 | 7 |
12 ErrorSupport::ErrorSupport() : m_errorString(nullptr) { } | 8 ErrorSupport::ErrorSupport() : m_errorString(nullptr) { } |
13 ErrorSupport::ErrorSupport(String16* errorString) : m_errorString(errorString) {
} | 9 ErrorSupport::ErrorSupport(String16* errorString) : m_errorString(errorString) {
} |
14 ErrorSupport::~ErrorSupport() | 10 ErrorSupport::~ErrorSupport() |
15 { | 11 { |
16 if (m_errorString && hasErrors()) { | 12 if (m_errorString && hasErrors()) { |
17 String16Builder builder; | 13 String16Builder builder; |
18 builder.append("Internal error(s): "); | 14 builder.append("Internal error(s): "); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 for (size_t i = 0; i < m_errors.size(); ++i) { | 57 for (size_t i = 0; i < m_errors.size(); ++i) { |
62 if (i) | 58 if (i) |
63 builder.append("; "); | 59 builder.append("; "); |
64 builder.append(m_errors[i]); | 60 builder.append(m_errors[i]); |
65 } | 61 } |
66 return builder.toString(); | 62 return builder.toString(); |
67 } | 63 } |
68 | 64 |
69 } // namespace protocol | 65 } // namespace protocol |
70 } // namespace blink | 66 } // namespace blink |
OLD | NEW |