// Path: app/src/main/java/york/com/retrofit2rxjavademo/http/exception/ApiException.java
// public class ApiException extends Exception {
//     // 异常处理，为速度，不必要设置getter和setter
//     public int code;
//     public String message;
// 
//     public ApiException(Throwable throwable, int code) {
//         super(throwable);
//         this.code = code;
//     }
// }


import rx.Subscriber;
import york.com.retrofit2rxjavademo.http.exception.ApiException;
package york.com.retrofit2rxjavademo.subscribers;


/**
 * @author YorkYu
 * @version V1.0
 * @Project: Retrofit2RxjavaDemo
 * @Package york.com.retrofit2rxjavademo.subscribers
 * @Description:
 * @time 2016/8/11 10:48
 */
public abstract class BaseSubscriber<T> extends Subscriber<T> {
    @Override
    public void onError(Throwable e) {
// Path: app/src/main/java/york/com/retrofit2rxjavademo/http/exception/ApiException.java
// public class ApiException extends Exception {
//     // 异常处理，为速度，不必要设置getter和setter
//     public int code;
//     public String message;
// 
//     public ApiException(Throwable throwable, int code) {
//         super(throwable);
//         this.code = code;
//     }
// }


// Path: app/src/main/java/york/com/retrofit2rxjavademo/subscribers/BaseSubscriber.java
import rx.Subscriber;
import york.com.retrofit2rxjavademo.http.exception.ApiException;

package york.com.retrofit2rxjavademo.subscribers;


/**
 * @author YorkYu
 * @version V1.0
 * @Project: Retrofit2RxjavaDemo
 * @Package york.com.retrofit2rxjavademo.subscribers
 * @Description:
 * @time 2016/8/11 10:48
 */
public abstract class BaseSubscriber<T> extends Subscriber<T> {
    @Override
    public void onError(Throwable e) {
        if(e instanceof ApiException){