create error-checking lambda wrapper for NetworkInterfaceASIO

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: