fromCodeSequence method

  1. @override
ApiExceptionBase fromCodeSequence(
  1. DioError error,
  2. Iterator<String> codeSequence
)
override

Implementation

@override
ApiExceptionBase fromCodeSequence(
    DioError error, Iterator<String> codeSequence) {
  final code = (codeSequence..moveNext()).current;
  final builder = _builders[code];
  if (builder == null) {
    throw ApiExceptionError.UnregisteredCode(code);
  }
  return builder(error, codeSequence);
}