Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
That is fragment of Scala program that calls objects from com.mongodb.reactivestreams:
val client = MongoClients.create()
val db = client.getDatabase("test")
db.listCollectionNames().subscribe(new Subscriber[String]
{ def onSubscribe(s: Subscription) = println("onSubscribe") def onNext(elem: String) = println("onNext") def onError(t: Throwable) = println("onError") def onComplete() = println("onComplete") })
When database is not exist, I see on console:
onSubscribe
00:27:13.696 INFO org.mongodb.driver.cluster - Exception in monitor thread while connecting to server localhost:27017
00:27:13.696
...
But OnError is not called.
How can I handle this error?