Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19242

create error-checking lambda wrapper for NetworkInterfaceASIO

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.1.6
    • Affects Version/s: 3.1.5
    • Component/s: Networking
    • None
    • Fully Compatible
    • Platform 6 07/17/15

      We have this sort of logic duplicated throughout the file:

      some_async_method([this, op](std::error_code ec) {
           if (op->canceled())
                handle_cancellation;
           if (ec)
                handle_error;
      
           // do other stuff
      }
      

      It would be nice to handle this error-checking logic in a single place.

            Assignee:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: