tryParse<T> function

Future<T> tryParse<T>(
  1. TryParserMethod<T> method
)

Implementation

Future<T> tryParse<T>(TryParserMethod<T> method) async {
  T result;
  try {
    result = await method();
  } catch (e) {
    log(e.toString());
    throw NetworkError('NetworkError: Parser exception.\nException: $e');
  }
  return result;
}