Skip to content

Commit c5a13ba

Browse files
committed
Scripts: add traces to error output
1 parent a02562e commit c5a13ba

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

scripts/collection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ function errorToString(errors, context) {
639639
if (_.isArray(errors))
640640
result += Json2String(errors);
641641
else
642-
result += errors + '\n';
642+
result += errors.stack + '\n';
643643
}
644644

645645
if (warnings) {

scripts/sort_json.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
var fs = require('fs');
5+
var sortobject = require('deep-sort-object');
6+
7+
var file = process.argv[2];
8+
9+
var data = fs.readFileSync(file, 'utf-8');
10+
var json = JSON.parse(data);
11+
json = sortobject(json);
12+
data = JSON.stringify(json, null, 2) + '\n';
13+
fs.writeFileSync(file, data);

scripts/undefined

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sed -n 's/^.*Definition could not be resolved: #\/definitions\/\(.*\)".*$/\1/p' add.log

0 commit comments

Comments
 (0)