Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1657

Provide a custom exception message to Timeout.timeout calls

    XMLWordPrintable

Details

    • 1
    • When the network operations fail with a timeout, the driver now provides a more descriptive exception message.
    • Minor Change

    Description

      The driver has two places where it calls Timeout.timeout:

      lib/mongo/socket/ssl.rb: Timeout.timeout(connect_timeout, Error::SocketTimeoutError) do
      lib/mongo/socket/tcp.rb: Timeout.timeout(connect_timeout, Error::SocketTimeoutError) do

      These calls specify a custom exception class but not a custom message. We can additionally supply a custom message to make it more clear when troubleshooting whether a timeout is driver-originated or comes from someone wrapping a call (possibly via patching the driver) in Timeout.timeout.

      Attachments

        Activity

          People

            neil.shweky@mongodb.com Neil Shweky
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: