| Index: pkg/unittest/lib/src/test_case.dart
|
| diff --git a/pkg/unittest/lib/src/test_case.dart b/pkg/unittest/lib/src/test_case.dart
|
| index 75e126c9a2b1f0ef73ebc6943e7c7170c68c5193..d9650825bab97682cadaf3a52648d7e4c2eaf463 100644
|
| --- a/pkg/unittest/lib/src/test_case.dart
|
| +++ b/pkg/unittest/lib/src/test_case.dart
|
| @@ -68,7 +68,14 @@ class TestCase {
|
| bool get isComplete => !enabled || result != null;
|
|
|
| Function _errorHandler(String stage) => (e) {
|
| - var stack = getAttachedStackTrace(e);
|
| + var stack;
|
| + // TODO(kevmoo): Ideally, getAttachedStackTrace should handle Error as well?
|
| + // https://code.google.com/p/dart/issues/detail?id=12240
|
| + if(e is Error) {
|
| + stack = e.stackTrace;
|
| + } else {
|
| + stack = getAttachedStackTrace(e);
|
| + }
|
| if (result == null || result == PASS) {
|
| if (e is TestFailure) {
|
| fail("$e", stack);
|
|
|