OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_TEST_WEBDRIVER_WEBDRIVER_ERROR_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_ERROR_H_ |
6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_ERROR_H_ | 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_ERROR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class Error { | 42 class Error { |
43 public: | 43 public: |
44 explicit Error(ErrorCode code); | 44 explicit Error(ErrorCode code); |
45 | 45 |
46 Error(ErrorCode code, const std::string& details); | 46 Error(ErrorCode code, const std::string& details); |
47 | 47 |
48 virtual ~Error(); | 48 virtual ~Error(); |
49 | 49 |
50 void AddDetails(const std::string& details); | 50 void AddDetails(const std::string& details); |
51 | 51 |
52 std::string GetMessage() const; | 52 std::string GetErrorMessage() const; |
53 | 53 |
54 ErrorCode code() const; | 54 ErrorCode code() const; |
55 const std::string& details() const; | 55 const std::string& details() const; |
56 const base::debug::StackTrace& trace() const; | 56 const base::debug::StackTrace& trace() const; |
57 | 57 |
58 private: | 58 private: |
59 ErrorCode code_; | 59 ErrorCode code_; |
60 std::string details_; | 60 std::string details_; |
61 base::debug::StackTrace trace_; | 61 base::debug::StackTrace trace_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(Error); | 63 DISALLOW_COPY_AND_ASSIGN(Error); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace webdriver | 66 } // namespace webdriver |
67 | 67 |
68 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_ERROR_H_ | 68 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_ERROR_H_ |
OLD | NEW |