Chromium Code Reviews| Index: corelib/src/implementation/future_implementation.dart |
| diff --git a/corelib/src/implementation/future_implementation.dart b/corelib/src/implementation/future_implementation.dart |
| index 21ee08f26d01b5118749cc8b4ed67c1b0c838c85..9b6c12c80a05a1224a074f91e67213c84d366e21 100644 |
| --- a/corelib/src/implementation/future_implementation.dart |
| +++ b/corelib/src/implementation/future_implementation.dart |
| @@ -172,14 +172,14 @@ class FutureImpl<T> implements Future<T> { |
| Future transform(Function transformation) { |
| final completer = new Completer(); |
| handleException((e) { |
| - completer.completeException(e); |
| + completer.completeException(e, this.stackTrace); |
| return true; |
| }); |
| then((v) { |
| var transformed = null; |
| try { |
| transformed = transformation(v); |
| - } catch (final ex, final stackTrace) { |
| + } catch (Exception ex, final stackTrace) { |
|
Siggi Cherem (dart-lang)
2012/07/03 19:13:46
weird, why is this needed? what if it was 'var' or
nweiz
2012/07/03 21:39:26
With "var" or "final", the stack trace isn't captu
Siggi Cherem (dart-lang)
2012/07/03 22:10:06
weird... if you haven't already, file a bug on the
|
| completer.completeException(ex, stackTrace); |
| return; |
| } |
| @@ -191,19 +191,19 @@ class FutureImpl<T> implements Future<T> { |
| Future chain(Function transformation) { |
| final completer = new Completer(); |
| handleException((e) { |
| - completer.completeException(e); |
| + completer.completeException(e, this.stackTrace); |
| return true; |
| }); |
| then((v) { |
| var future = null; |
| try { |
| future = transformation(v); |
| - } catch (final ex, final stackTrace) { |
| + } catch (Exception ex, final stackTrace) { |
| completer.completeException(ex, stackTrace); |
| return; |
| } |
| future.handleException((e) { |
| - completer.completeException(e); |
| + completer.completeException(e, this.stackTrace); |
| return true; |
| }); |
| future.then((b) => completer.complete(b)); |