canCatch method

  1. @nonVirtual
bool canCatch(
  1. Object exception
)

Implementation

@nonVirtual
bool canCatch(Object exception) {
  // If T is `Exception` then the ExceptionCatcher was not
  // supplied with a type argument
  // ignore: literal_only_boolean_expressions
  if ('$T' == '$Exception') {
    return false;
  }

  return exception is T;
}