nelson.lang.correction.ReplaceIdentifierCorrection
Correct error by replacing identifier in function call.
📝Syntax
correction = nelson.lang.correction.ReplaceIdentifierCorrection(identifier, replacement)
📥Input Arguments
Parameter Description
identifier incorrect identifier in the function call.
replacement replacement identifier.
📤Output Arguments
Parameter Description
correction a nelson.lang.correction.ReplaceIdentifierCorrection object.
📄Description

Use nelson.lang.correction.ReplaceIdentifierCorrection objects in functions that throw a MException object.

correction = nelson.lang.correction.ReplaceIdentifierCorrection(identifier, replacement) creates a correction that suggests replacing identifier with replacement in the function call that threw the MException object.

The read-only Identifier and Replacement properties contain the incorrect identifier and replacement identifier.

💡Examples
ME = MException('nelson:unknownName', 'Unknown identifier.');
correction = nelson.lang.correction.ReplaceIdentifierCorrection('oldName', 'newName');
ME = addCorrection(ME, correction)
ME.Correction.Replacement
🔗See Also
addCorrectionnelson.lang.correction.AppendArgumentsCorrectionnelson.lang.correction.ConvertToFunctionNotationCorrection
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub