PLCgen: improve error message for I/O table entry with absolute name of CIF object not found in root of the specification
In such as case, the following error message is produced:
...
CAUSE: (IllegalArgumentException) Name "x" not found in "".
It is not very clear what "" means. It is the absolute name of the CIF specification, the root of the model.
The culprit is org.eclipse.escet.cif.common.CifScopeUtils.getObject, which has the following code:
// Name not found, or unknown scope. Error message not perfect for
// specification scope, as it has an empty absolute name, but good
// enough for an internal error message.
String msg = fmt("Name \"%s\" not found in \"%s\".", name, CifTextUtils.getAbsName(scope));
throw new IllegalArgumentException(msg);
Clearly, this is not only used for internal error messages, so it should be improved so that it gives a proper end-user error message.