[SERVER-19242] create error-checking lambda wrapper for NetworkInterfaceASIO Created: 01/Jul/15  Updated: 05/Feb/16  Resolved: 14/Jul/15

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 3.1.5
Fix Version/s: 3.1.6

Type: Improvement Priority: Minor - P4
Reporter: Samantha Ritter (Inactive) Assignee: Samantha Ritter (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platform 6 07/17/15
Participants:

 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.



 Comments   
Comment by Githook User [ 14/Jul/15 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: SERVER-19242 wrap state machine lambdas in pre-condition checks
Branch: master
https://github.com/mongodb/mongo/commit/41c97d945bdecb1ac07bb8b9f6af5413b2d64165

Generated at Thu Feb 08 03:50:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.