Provide a custom exception message to Timeout.timeout calls

XMLWordPrintableJSON

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

      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.

              Assignee:
              Neil Shweky (Inactive)
              Reporter:
              Oleg Pudeyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: