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

create error-checking lambda wrapper for NetworkInterfaceASIO

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 3.1.6
    • 3.1.5
    • Networking
    • None
    • Fully Compatible
    • Platform 6 07/17/15

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: