yak_error_handler 0.5.0+0 copy "yak_error_handler: ^0.5.0+0" to clipboard
yak_error_handler: ^0.5.0+0 copied to clipboard

a small package to handle exception and errors consistently across app and packages

example/README.md

Example #

import 'package:yak_error_handler/yak_error_handler.dart';
import 'package:yak_runner/yak_runner.dart';

Stream<int> get stream => Stream.fromIterable([for (var i = 0; i < 10; ++i) i]);

final onError = ErrorHandler<AvowError>((_) => print('this is odd!'));
final runner = YakRunnerArg<void, int>(
  (i) {
    avow(i.isEven);
    print(i);
  },
  exceptionHandler: ExceptionHandler(),
  errorHandlers: {onError},
);

void main() => stream.listen(runner);

Jump to Source

2
likes
120
pub points
0%
popularity

Publisher

verified publisheryakforward.com

a small package to handle exception and errors consistently across app and packages

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on yak_error_handler