No diagnostic of connect fault to database

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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?

            Assignee:
            Unassigned
            Reporter:
            Andrew Kaplanov
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: