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

Side by Side Diff: lib/test.dart

Issue 1058973004: Remove handleExternalError. (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 | « CHANGELOG.md ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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; 5 library test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:path/path.dart' as p; 9 import 'package:path/path.dart' as p;
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 /// Registers a function to be run after tests. 165 /// Registers a function to be run after tests.
166 /// 166 ///
167 /// This function will be called after each test is run. [callback] may be 167 /// This function will be called after each test is run. [callback] may be
168 /// asynchronous; if so, it must return a [Future]. 168 /// asynchronous; if so, it must return a [Future].
169 /// 169 ///
170 /// If this is called within a test group, it applies only to tests in that 170 /// If this is called within a test group, it applies only to tests in that
171 /// group. [callback] will be run before any tear-down callbacks in parent 171 /// group. [callback] will be run before any tear-down callbacks in parent
172 /// groups or at the top level. 172 /// groups or at the top level.
173 void tearDown(callback()) => _declarer.tearDown(callback); 173 void tearDown(callback()) => _declarer.tearDown(callback);
174 174
175 /// Handle an error that occurs outside of any test.
176 void handleExternalError(error, String message, [stackTrace]) {
177 // TODO(nweiz): handle this better.
178 registerException(error, stackTrace);
179 }
180
181 /// Registers an exception that was caught for the current test. 175 /// Registers an exception that was caught for the current test.
182 void registerException(error, [StackTrace stackTrace]) => 176 void registerException(error, [StackTrace stackTrace]) =>
183 Invoker.current.handleError(error, stackTrace); 177 Invoker.current.handleError(error, stackTrace);
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698