correction = nelson.lang.correction.ReplaceIdentifierCorrection(identifier, replacement)
| Parameter | Description |
|---|---|
| identifier | incorrect identifier in the function call. |
| replacement | replacement identifier. |
| Parameter | Description |
|---|---|
| correction | a nelson.lang.correction.ReplaceIdentifierCorrection object. |
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.
ME = MException('nelson:unknownName', 'Unknown identifier.');
correction = nelson.lang.correction.ReplaceIdentifierCorrection('oldName', 'newName');
ME = addCorrection(ME, correction)
ME.Correction.Replacement
| Version | Description |
|---|---|
| 2.0.0 | initial version |