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

Issue 10908040: Support transforming the exception in Future.transform(). (Closed)

Created:
8 years, 3 months ago by Bob Nystrom
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support transforming the exception in Future.transform(). Committed: https://code.google.com/p/dart/source/detail?r=11844

Patch Set 1 #

Total comments: 3

Patch Set 2 : Split transformException() out into separate method. #

Total comments: 7

Patch Set 3 : Allow transformException to complete successfully. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -4 lines) Patch
M lib/core/future.dart View 1 2 1 chunk +13 lines, -1 line 0 comments Download
M lib/coreimpl/future_implementation.dart View 1 2 2 chunks +23 lines, -3 lines 0 comments Download
M tests/corelib/future_test.dart View 1 2 2 chunks +50 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Bob Nystrom
With normal exceptions, it's common to catch a lower-level exception and rethrow something higher-level or ...
8 years, 3 months ago (2012-08-31 17:39:26 UTC) #1
Siggi Cherem (dart-lang)
Looks nice! Nice tests :) I haven't thought too much about it, but an alternative ...
8 years, 3 months ago (2012-09-04 16:56:32 UTC) #2
Bob Nystrom
Took your suggestion and made transformException() a separate operation. PTAL and let me know what ...
8 years, 3 months ago (2012-09-04 18:00:48 UTC) #3
Siggi Cherem (dart-lang)
lgtm https://chromiumcodereview.appspot.com/10908040/diff/6001/lib/core/future.dart File lib/core/future.dart (right): https://chromiumcodereview.appspot.com/10908040/diff/6001/lib/core/future.dart#newcode140 lib/core/future.dart:140: * returns anything else, the original exception will ...
8 years, 3 months ago (2012-09-04 20:17:52 UTC) #4
nweiz
This change seems like a positive incremental movement on the current API, but I'm worried ...
8 years, 3 months ago (2012-09-04 20:26:14 UTC) #5
Bob Nystrom
Thanks! https://chromiumcodereview.appspot.com/10908040/diff/6001/lib/core/future.dart File lib/core/future.dart (right): https://chromiumcodereview.appspot.com/10908040/diff/6001/lib/core/future.dart#newcode140 lib/core/future.dart:140: * returns anything else, the original exception will ...
8 years, 3 months ago (2012-09-04 21:14:43 UTC) #6
nweiz
8 years, 3 months ago (2012-09-04 21:35:34 UTC) #7
lgtm

https://chromiumcodereview.appspot.com/10908040/diff/6001/lib/core/future.dart
File lib/core/future.dart (right):

https://chromiumcodereview.appspot.com/10908040/diff/6001/lib/core/future.dar...
lib/core/future.dart:142: Future transformException(bool transformation(Object
exception));
On 2012/09/04 21:14:43, Bob Nystrom wrote:
> On 2012/09/04 20:26:14, nweiz wrote:
> > It seems like this should just be the default behavior of handleException.
> 
> I'm trying to keep this change as minimally invasive as possible, so I don't
> want to change the behavior of existing methods. How about I ignore this for
now
> and after M1 we look at a revamp?

Sure, seems fine.

Powered by Google App Engine
This is Rietveld 408576698