Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: tools/battor_agent/battor_error.cc

Issue 2826913002: [BattOr] Retry battor_agent commands when they fail. (Closed)
Patch Set: Swapped return with break Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/battor_agent/battor_error.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "tools/battor_agent/battor_error.h" 5 #include "tools/battor_agent/battor_error.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace battor { 9 namespace battor {
10 10
11 std::string BattOrErrorToString(BattOrError error) { 11 std::string BattOrErrorToString(BattOrError error) {
12 switch (error) { 12 switch (error) {
13 case BATTOR_ERROR_NONE: 13 case BATTOR_ERROR_NONE:
14 return "NONE"; 14 return "NONE";
15 case BATTOR_ERROR_CONNECTION_FAILED: 15 case BATTOR_ERROR_CONNECTION_FAILED:
16 return "CONNECTION FAILED"; 16 return "CONNECTION FAILED";
17 case BATTOR_ERROR_TIMEOUT: 17 case BATTOR_ERROR_TIMEOUT:
18 return "TIMEOUT"; 18 return "TIMEOUT";
19 case BATTOR_ERROR_SEND_ERROR: 19 case BATTOR_ERROR_SEND_ERROR:
20 return "SEND ERROR"; 20 return "SEND ERROR";
21 case BATTOR_ERROR_RECEIVE_ERROR: 21 case BATTOR_ERROR_RECEIVE_ERROR:
22 return "RECEIVE ERROR"; 22 return "RECEIVE ERROR";
23 case BATTOR_ERROR_UNEXPECTED_MESSAGE: 23 case BATTOR_ERROR_UNEXPECTED_MESSAGE:
24 return "UNEXPECTED MESSAGE"; 24 return "UNEXPECTED MESSAGE";
25 case BATTOR_ERROR_TOO_MANY_INIT_RETRIES: 25 case BATTOR_ERROR_TOO_MANY_COMMAND_RETRIES:
26 return "TOO MANY INIT RETRIES"; 26 return "TOO MANY COMMAND RETRIES";
27 case BATTOR_ERROR_TOO_MANY_START_TRACING_RETRIES:
28 return "TOO MANY START_TRACING RETRIES";
29 } 27 }
30 28
31 NOTREACHED(); 29 NOTREACHED();
32 return std::string(); 30 return std::string();
33 } 31 }
34 32
35 } // namespace battor 33 } // namespace battor
OLDNEW
« no previous file with comments | « tools/battor_agent/battor_error.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698