Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef TOOLS_BATTOR_AGENT_BATTOR_ERROR_H_ | 5 #ifndef TOOLS_BATTOR_AGENT_BATTOR_ERROR_H_ |
| 6 #define TOOLS_BATTOR_AGENT_BATTOR_ERROR_H_ | 6 #define TOOLS_BATTOR_AGENT_BATTOR_ERROR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace battor { | 10 namespace battor { |
| 11 | 11 |
| 12 // A BattOrError is an error that occurs when communicating with a BattOr. | 12 // A BattOrError is an error that occurs when communicating with a BattOr. |
| 13 enum BattOrError { | 13 enum BattOrError { |
| 14 BATTOR_ERROR_NONE, | 14 BATTOR_ERROR_NONE, |
| 15 BATTOR_ERROR_CONNECTION_FAILED, | 15 BATTOR_ERROR_CONNECTION_FAILED, |
| 16 BATTOR_ERROR_TIMEOUT, | 16 BATTOR_ERROR_TIMEOUT, |
| 17 BATTOR_ERROR_SEND_ERROR, | 17 BATTOR_ERROR_SEND_ERROR, |
| 18 BATTOR_ERROR_RECEIVE_ERROR, | 18 BATTOR_ERROR_RECEIVE_ERROR, |
| 19 BATTOR_ERROR_UNEXPECTED_MESSAGE, | 19 BATTOR_ERROR_UNEXPECTED_MESSAGE, |
| 20 BATTOR_ERROR_INIT_ERROR, | |
|
charliea (OOO until 10-5)
2016/05/23 14:08:52
How about BATTOR_ERROR_INIT_TIMEOUT? This seems li
aschulman
2016/06/10 07:22:59
I went with BATTOR_ERROR_INIT_MAX_RETRIES since I
| |
| 20 }; | 21 }; |
| 21 | 22 |
| 22 std::string BattOrErrorToString(BattOrError error); | 23 std::string BattOrErrorToString(BattOrError error); |
| 23 | 24 |
| 24 } | 25 } |
| 25 | 26 |
| 26 #endif // TOOLS_BATTOR_AGENT_BATTOR_ERROR_H_ | 27 #endif // TOOLS_BATTOR_AGENT_BATTOR_ERROR_H_ |
| OLD | NEW |