[SERVER-33157] Using the no-impl version of catalog-related classes should provide a better error message Created: 07/Feb/18  Updated: 29/Oct/23  Resolved: 30/Apr/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Max Hirschhorn Assignee: ADAM Martin (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-32645 Create a tracker for dependency upon ... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

When the registerXX() function hasn't been called as a result of not linking in the library containing the corresponding MONGO_INITIALIZER, a std::bad_function_call exception is thrown that doesn't provide any useful context toward remediation steps.

Note: I'm filing this improvement request on behalf of xiangyu.yao; he encountered this issue while trying to define a target for C++ unit tests of the AutoGetXX RAII types. It would have been nice if the exception provided more context to have immediately realized that a library dependency was missing.



 Comments   
Comment by ADAM Martin (Inactive) [ 30/Apr/18 ]

SERVER-32645's completion should provide more failures with better diagnostic information in this situation.

Comment by ADAM Martin (Inactive) [ 12/Feb/18 ]

The linked ticket, SERVER-32645, will provide link-time mechanisms to help indicate when a dependency is missing. Further, this change will incorporate better run-time information for the cases that cannot be caught at link-time.

Generated at Thu Feb 08 04:32:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.