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

Unified Diff: pkg/webdriver/test/webdriver_test.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/webdriver/lib/webdriver.dart ('k') | runtime/bin/socket_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/webdriver/test/webdriver_test.dart
diff --git a/pkg/webdriver/test/webdriver_test.dart b/pkg/webdriver/test/webdriver_test.dart
index 213917fb6967c5eb80b75c38a2a6546bc13497b9..3c4d5007eb61bc2b5a378e50c3360fc436e524b7 100644
--- a/pkg/webdriver/test/webdriver_test.dart
+++ b/pkg/webdriver/test/webdriver_test.dart
@@ -1,4 +1,5 @@
library webdriver_test;
+import 'dart:async' show getAttachedStackTrace;
import 'package:webdriver/webdriver.dart';
import 'package:unittest/unittest.dart';
import 'package:unittest/vm_config.dart';
@@ -15,12 +16,13 @@ main() {
var web_driver = new WebDriver('localhost', 4444, '/wd/hub');
var session = null;
- var exceptionHandler = (e) {
- if (e.error is TestFailure) {
- currentTestCase.fail(e.error.message, e.stackTrace.toString());
+ var exceptionHandler = (error) {
+ var trace = getAttachedStackTrace(error);
+ String traceString = trace == null ? "" : trace.toString();
+ if (error is TestFailure) {
+ currentTestCase.fail(error.message, traceString);
} else {
- currentTestCase.error("Unexpected error: ${e.error}",
- e.stackTrace.toString());
+ currentTestCase.error("Unexpected error: ${error}", traceString);
}
if (session != null) {
var s = session;
« no previous file with comments | « pkg/webdriver/lib/webdriver.dart ('k') | runtime/bin/socket_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698