Skip to content

Instantly share code, notes, and snippets.

@anolivetree
Created February 26, 2016 00:48
Show Gist options
  • Save anolivetree/448391d75e399af82b39 to your computer and use it in GitHub Desktop.
Save anolivetree/448391d75e399af82b39 to your computer and use it in GitHub Desktop.
orma exception
Subscription subscribe = orma.selectFromToDo().executeAsObservable().map(new Func1<ToDo, Integer>() {
@Override
public Integer call(ToDo toDo) {
Log.i(TAG, "map called");
throw new RuntimeException("map error");
//return 0;
}
}).subscribe(new Action1<Integer>() {
@Override
public void call(Integer toDo) {
Log.i(TAG, "onNext called");
System.out.printf("onNext");
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
Log.i(TAG, "onError called " + throwable.toString());
System.out.printf("onError called " + throwable.toString());
}
}, new Action0() {
@Override
public void call() {
Log.i(TAG, "onComplete");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment