commit | 02ec22851ac73233de02d7cf7d7cfbacd0eaab84 | [log] [tgz] |
---|---|---|
author | Lasse R.H. Nielsen <lrn@google.com> | Fri Jul 03 10:11:55 2015 |
committer | Lasse R.H. Nielsen <lrn@google.com> | Fri Jul 03 10:11:55 2015 |
tree | a517d5f5cf5a6fc4e66e3df6124a2fbbd9017b97 | |
parent | 7b1fe533b036a8c13c86278bc1e66558ed27d663 [diff] |
Add handle method to ErrorResult. The handle method takes care of checking if the error handler function accepts two arguements or not, and calles it with error and stackTrace if possible, otherwise just with error. I noticed the pattern occuring multiple times when working with error results, so it would be better to have it handled in one place. Also changed result file to /// comments. R=sgjesse@google.com Review URL: https://codereview.chromium.org//1218813011.
Contains tools to work with asynchronous computations.
The package contains Stream
and Future
related functionality, as well as sub-libraries with different utilities.
The “stream_zip.dart” sub-library contains functionality to combine several streams of events into a single stream of tuples of events.
The “result.dart” sub-library introduces a Result
class that can hold either a value or an error. It allows capturing an asynchronous computation which can give either a value or an error, into an asynchronous computation that always gives a Result
value, where errors can be treated as data. It also allows releasing the Result
back into an asynchronous computation.
This package is unrelated to the discontinued async
package with version 0.1.7.
Please file feature requests and bugs at the issue tracker.