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

Side by Side Diff: lib/src/runner/load_exception_suite.dart

Issue 1098963002: Preserve the stack traces for load errors in isolates and iframes. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « lib/src/executable.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.runner.load_exception_suite; 5 library test.runner.load_exception_suite;
6 6
7 import 'dart:async';
8
7 import '../backend/invoker.dart'; 9 import '../backend/invoker.dart';
8 import '../backend/metadata.dart'; 10 import '../backend/metadata.dart';
9 import '../backend/suite.dart'; 11 import '../backend/suite.dart';
10 import 'load_exception.dart'; 12 import 'load_exception.dart';
11 13
12 /// A test suite generated from a load exception. 14 /// A test suite generated from a load exception.
13 /// 15 ///
14 /// Load exceptions are exposed as test suites so that they can be presented 16 /// Load exceptions are exposed as test suites so that they can be presented
15 /// alongside successful tests. 17 /// alongside successful tests.
16 class LoadExceptionSuite extends Suite { 18 class LoadExceptionSuite extends Suite {
17 /// The exception that this suite exposes. 19 /// The exception that this suite exposes.
18 final LoadException exception; 20 final LoadException exception;
21 final StackTrace stackTrace;
19 22
20 LoadExceptionSuite(LoadException exception) 23 LoadExceptionSuite(LoadException exception, stackTrace)
21 : exception = exception, 24 : exception = exception,
25 stackTrace = stackTrace,
22 super([ 26 super([
23 new LocalTest("load error", new Metadata(), () => throw exception) 27 new LocalTest("load error", new Metadata(),
28 () => new Future.error(exception, stackTrace))
24 ], path: exception.path); 29 ], path: exception.path);
25 } 30 }
OLDNEW
« no previous file with comments | « lib/src/executable.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698