AppException.fromObject constructor

AppException.fromObject(
  1. Object error
)

Implementation

factory AppException.fromObject(final Object error) {
  if (error is AppException) {
    return error;
  } else if (error is ShellException) {
    return AppException.fromShellException(error);
  } else if (error is DioException) {
    return AppException.fromDioException(error);
  } else {
    return AppException(
      name: "Unknown Exception",
      message: "An unknown issue occurred during the last process",
      description: error.toString(),
    );
  }
}