[SERVER-33351] remove try/catch in background job Created: 15/Feb/18 Updated: 29/Oct/23 Resolved: 18/Dec/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Gabriel Russell (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | former-quick-wins, neweng, service_architecture | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Dev Tools 2018-12-03, Dev Tools 2018-12-17, Dev Tools 2018-12-31 | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
BackgroundJob::jobBody() has this code:
The problem with this is that the rethrow will always trigger std::terminate(), since there are no further exception handlers up the stack. The catch-and-rethrow here will make the resulting stack trace appear from the point of rethrow instead of at the point of the original throw, making the stack trace useless for debugging. If we removed this try/catch, the stack trace would become useful again. Note that our terminate handler already successfully logs e.what(), so no functionality will be lost. |
| Comments |
| Comment by Githook User [ 13/Dec/18 ] |
|
Author: {'username': 'gabrielrussell', 'email': 'gabriel.russell@mongodb.com', 'name': 'Gabriel Russell'}Message: |