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

Unified Diff: pkg/webdriver/lib/webdriver.dart

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/unittest/lib/src/test_case.dart ('k') | pkg/webdriver/test/webdriver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/webdriver/lib/webdriver.dart
diff --git a/pkg/webdriver/lib/webdriver.dart b/pkg/webdriver/lib/webdriver.dart
index 9fed8d708a796484bede217a732126a77deee7e9..cc6b7d3fe34b8a77e792d9a3b1712cdd346aab29 100644
--- a/pkg/webdriver/lib/webdriver.dart
+++ b/pkg/webdriver/lib/webdriver.dart
@@ -215,9 +215,10 @@ class WebDriverBase {
_url = 'http://$_host:$_port$_path';
}
- void _failRequest(Completer completer, error, StackTrace stackTrace) {
+ void _failRequest(Completer completer, error, [stackTrace]) {
if (completer != null) {
- completer.completeError(new WebDriverError(-1, error), stackTrace);
+ var trace = stackTrace != null ? stackTrace, getAttachedStackTrace(error);
+ completer.completeError(new WebDriverError(-1, error), trace);
}
}
@@ -273,7 +274,7 @@ class WebDriverBase {
results = new String.fromCharCodes(body).trim();
if (!successCodes.contains(rsp.statusCode)) {
_failRequest(completer,
- 'Unexpected response ${rsp.statusCode}; $results', null);
+ 'Unexpected response ${rsp.statusCode}; $results');
completer = null;
return;
}
@@ -297,18 +298,18 @@ class WebDriverBase {
completer.complete(value);
}
}
- }, onError: (e) {
- _failRequest(completer, e.error, e.stackTrace);
+ }, onError: (error) {
+ _failRequest(completer, error);
completer = null;
});
})
- .catchError((e) {
- _failRequest(completer, e.error, e.stackTrace);
+ .catchError((error) {
+ _failRequest(completer, error);
completer = null;
});
})
- .catchError((e) {
- _failRequest(completer, e.error, e.stackTrace);
+ .catchError((error) {
+ _failRequest(completer, error);
completer = null;
});
} catch (e, s) {
« no previous file with comments | « pkg/unittest/lib/src/test_case.dart ('k') | pkg/webdriver/test/webdriver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698