Output the exception information when pretty switch is enabled (#504)
* Bug #1106292 output exception info Output the exception information When pretty switch is enabled.
This commit is contained in:
Родитель
78833af62c
Коммит
11713918e3
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## 04/10/2020 0.21.5
|
||||
|
||||
- Output exception information when pretty switch is enabled.
|
||||
|
||||
## 04/10/2020 0.21.4
|
||||
|
||||
- Instead of replacing all the special characters in path parameters, only replace the part of parameter value which start with (http:|https:)
|
||||
|
|
|
@ -221,7 +221,28 @@ export async function validateExamples(
|
|||
}
|
||||
return errors
|
||||
} catch (e) {
|
||||
log.error(e)
|
||||
if (o.pretty) {
|
||||
if (process.env["Agent.Id"]) {
|
||||
console.log(
|
||||
vsoLogIssueWrapper(
|
||||
"error",
|
||||
`Validating "examples" and "x-ms-examples" in ${specPath}:\n`
|
||||
)
|
||||
)
|
||||
/* tslint:disable-next-line:no-console no-string-literal */
|
||||
console.error(vsoLogIssueWrapper("error", e))
|
||||
} else {
|
||||
console.error(
|
||||
`Validating "examples" and "x-ms-examples" in ${specPath}:\n`
|
||||
)
|
||||
/* tslint:disable-next-line:no-console no-string-literal */
|
||||
console.error("\x1b[31m", "error", ":", "\x1b[0m")
|
||||
/* tslint:disable-next-line:no-console no-string-literal */
|
||||
console.error(e)
|
||||
}
|
||||
} else {
|
||||
log.error(e)
|
||||
}
|
||||
validator.specValidationResult.validityStatus = false
|
||||
updateEndResultOfSingleValidation(validator)
|
||||
return [{ inner: e }]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "oav",
|
||||
"version": "0.21.4",
|
||||
"version": "0.21.5",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "oav",
|
||||
"version": "0.21.4",
|
||||
"version": "0.21.5",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation",
|
||||
"email": "azsdkteam@microsoft.com",
|
||||
|
|
Загрузка…
Ссылка в новой задаче