package com.tjzhxx.union.public_store.rx;

import io.reactivex.Observable;
import io.reactivex.functions.Function;

/**
 *错误处理
 * Created by Dong on 2017/1/17.
 */

public class ApiThrowableExceptionFunc<T> implements Function<Throwable, Observable<T>> {

    @Override
    public Observable<T> apply(Throwable throwable) throws Exception {
        return Observable.error(ExceptionHandle.handleException(throwable));
    }
}
