what will happen with this code, does it crash app...
# rx
m
what will happen with this code, does it crash app or pass the exception down to
onError()
Copy code
val testNulls = Observable.create<String> {
        throw NullPointerException()//case 1
//        it.onNext(null!!) // case 2
        it.onNext("Ahmed")
    }
a
Best way to find out is to test it, but I'd expect it to pass the initial NPE to the onError block
u
I believe it will go to the uncaught handler
m
well I did a test and throwing NLP in
create()
will just pass the exception to
onError()
but if you tried to pass Null as a value it will crash the stream