read-data-file 2.0.10 → 2.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rdf.mjs +2 -1
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  { "name": "read-data-file",
2
- "version": "2.0.10",
2
+ "version": "2.0.11",
3
3
  "description": "Read data/config files in various formats (parsers list is configurable).",
4
4
  "keywords": [
5
5
  "read data file",
package/rdf.mjs CHANGED
@@ -134,7 +134,8 @@ const defaultImpl = {
134
134
  return data;
135
135
  } catch (err) {
136
136
  err.dataFilePath = path;
137
- err.message += ' Error occurred while trying to read file ' + path;
137
+ const trace = 'While reading file ' + JSON.stringify(path) + ': ';
138
+ err.message = trace + err.message;
138
139
  throw err;
139
140
  }
140
141
  },