Merge pull request #169 from amarzavery/master
Provide the filename in error message that has an incorrect json.
This commit is contained in:
Коммит
b3ee14feed
|
@ -1,3 +1,6 @@
|
|||
### 09/12/2017 0.4.13
|
||||
- Provide the filepath of the file that has an incorrect json. This makes it easy for customers to find out the faulty file among numerous files.
|
||||
|
||||
### 09/12/2017 0.4.12
|
||||
- [Model Validator] Should handle forward slashes in path parameters. #165
|
||||
- [Model Validator] Should handle question mark in paths that are defined in x-ms-paths. #140
|
||||
|
|
|
@ -74,8 +74,10 @@ exports.parseJson = function parseJson(specPath) {
|
|||
exports.docCache[specPath] = result;
|
||||
return Promise.resolve(result);
|
||||
} catch (err) {
|
||||
log.error(err);
|
||||
return Promise.reject(err);
|
||||
let msg = `Unable to read the content or execute "JSON.parse()" on the content of file "${specPath}". The error is:\n${err}`;
|
||||
let e = new Error(msg);
|
||||
log.error(e);
|
||||
return Promise.reject(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "oav",
|
||||
"version": "0.4.12",
|
||||
"version": "0.4.13",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "oav",
|
||||
"version": "0.4.12",
|
||||
"version": "0.4.13",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation",
|
||||
"email": "azsdkteam@microsoft.com",
|
||||
|
|
Загрузка…
Ссылка в новой задаче