handleError static method

YOLOException handleError(
  1. dynamic e,
  2. String context
)

Handles any exception with a custom context message.

e The exception to handle context The context message describing what operation failed

Implementation

static YOLOException handleError(dynamic e, String context) {
  if (e is PlatformException) {
    return handlePlatformException(e, context: context);
  }

  return handleGenericException(e, context: context);
}