Skip to content

Commit

Permalink
refactor/ErrorHandling: ErrorHandler should on Manager
Browse files Browse the repository at this point in the history
'on' keyword added to ErrorHandler class. Now not necessary to override getAuthManager function.

FOOTER
  • Loading branch information
kemalturk committed Feb 18, 2020
1 parent 980ea56 commit 69f1864
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ErrorHandler.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import 'dart:async';

import 'package:sprinkle/AuthManager.dart';
import 'package:sprinkle/Manager.dart';


mixin ErrorHandler {
mixin ErrorHandler on Manager {

void handleError(Object object, StackTrace stackTrace, EventSink sink);

//Optional override
AuthManager getAuthManager() => null;
AuthManager getAuthManager() => dispatch<AuthManager>();

StreamTransformer<T, T> errorHandler<T>() => StreamTransformer<T, T>.fromHandlers(
handleError: (object, stackTrace, sink) {
Expand Down

0 comments on commit 69f1864

Please sign in to comment.