decode static method

void decode(
  1. dynamic exception
)

Decode exception

Implementation

static void decode(dynamic exception) {
  try {
    throw _errors
        .firstWhere((e) => e.isException(exception))
        .build(exception);
  } catch (e) {
    if (e is StateError) throw exception;
    _controller.add(e);
    rethrow;
  }
}