addError method
Build a meaningful error message from the current
runtime information and original message err.
Implementation
void addError(String err) {
final msg = switch (debugPath) {
final String path => '$err\n\t... in "$path".',
_ => err,
};
results.addError(msg);
}