Store reason as a field in MissingExperimentalFeature
Store the reason string as a field in the exception class rather than only embedding it in the error message. This supports better structured error handling and future JSON error reporting. Suggested by Ericson2314 in PR review.
This commit is contained in:
@@ -383,6 +383,7 @@ MissingExperimentalFeature::MissingExperimentalFeature(ExperimentalFeature featu
|
||||
showExperimentalFeature(feature),
|
||||
Uncolored(optionalBracket(" (", reason, ")")))
|
||||
, missingFeature(feature)
|
||||
, reason{reason}
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,8 @@ public:
|
||||
*/
|
||||
ExperimentalFeature missingFeature;
|
||||
|
||||
std::string reason;
|
||||
|
||||
MissingExperimentalFeature(ExperimentalFeature missingFeature, std::string reason = "");
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user