BaseException.fromJson constructor

BaseException.fromJson(
  1. dynamic exception
)

Implementation

factory BaseException.fromJson(var exception) {
  if (exception is DioException) {
    return BaseException.fromDioError(exception);
  }
  if (exception is BaseException) {
    return exception;
  } else {
    var apiException = BaseException(-1, unknownException);
    return apiException;
  }
}