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

Side by Side Diff: chrome/test/webdriver/webdriver_error.cc

Issue 7648053: [chromedriver] Add chrome.detach option for configuring Chrome not to quit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile issue Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/webdriver/webdriver_error.h ('k') | chrome/test/webdriver/webdriver_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/test/webdriver/webdriver_error.h" 5 #include "chrome/test/webdriver/webdriver_error.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 namespace webdriver { 9 namespace webdriver {
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 Error::~Error() { 56 Error::~Error() {
57 } 57 }
58 58
59 void Error::AddDetails(const std::string& details) { 59 void Error::AddDetails(const std::string& details) {
60 if (details_.empty()) 60 if (details_.empty())
61 details_ = details; 61 details_ = details;
62 else 62 else
63 details_ = details + ";\n " + details_; 63 details_ = details + ";\n " + details_;
64 } 64 }
65 65
66 std::string Error::GetMessage() const { 66 std::string Error::GetErrorMessage() const {
67 std::string msg; 67 std::string msg;
68 if (details_.length()) 68 if (details_.length())
69 msg = details_; 69 msg = details_;
70 else 70 else
71 msg = DefaultMessageForErrorCode(code_); 71 msg = DefaultMessageForErrorCode(code_);
72 72
73 // Only include a stacktrace on Linux. Windows and Mac have all symbols 73 // Only include a stacktrace on Linux. Windows and Mac have all symbols
74 // stripped in release builds. 74 // stripped in release builds.
75 #if defined(OS_LINUX) 75 #if defined(OS_LINUX)
76 size_t count = 0; 76 size_t count = 0;
(...skipping 14 matching lines...) Expand all
91 91
92 const std::string& Error::details() const { 92 const std::string& Error::details() const {
93 return details_; 93 return details_;
94 } 94 }
95 95
96 const base::debug::StackTrace& Error::trace() const { 96 const base::debug::StackTrace& Error::trace() const {
97 return trace_; 97 return trace_;
98 } 98 }
99 99
100 } // namespace webdriver 100 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/webdriver_error.h ('k') | chrome/test/webdriver/webdriver_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698