Skip to content

Commit

Permalink
Coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoefe committed Dec 12, 2016
1 parent bff93c5 commit 1473641
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/txt-to-sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ function catchErrors(info, err) {
//console.log("err", err); console.log("err.stack", err.stack); console.log("opts", info.opts)
var errors = (err.errors || [err.message]);
var stack = info.opts.verboseErrors ? err.stack : null;
return { errors: errors, opts:info.opts, stack:stack};
return { errors: errors, opts:info.opts, errorStack:stack};
}

function generatePrepareResult(info) {
Expand Down
4 changes: 3 additions & 1 deletion test/errors/row-diff-num-columns.param.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
tableName: t1
tableName: t1
opts:
verboseErrors: true
4 changes: 4 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ describe("input errors", function(){
//console.log(check.name, "prep", prepared.errors, "expe", expected.errors)
expect(prepared.errors).to.eql(expected.errors);
expect(prepared.warnings).to.eql(expected.warnings);
if(prepared.errorStack) {
//console.log("prepared.errorStack", prepared.errorStack)
expect(prepared.errorStack).to.match(/txt-to-sql.js/);
}
}).then(done,done);
});
}
Expand Down
2 changes: 1 addition & 1 deletion web/txt-to-sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ function catchErrors(info, err) {
//console.log("err", err); console.log("err.stack", err.stack); console.log("opts", info.opts)
var errors = (err.errors || [err.message]);
var stack = info.opts.verboseErrors ? err.stack : null;
return { errors: errors, opts:info.opts, stack:stack};
return { errors: errors, opts:info.opts, errorStack:stack};
}

function generatePrepareResult(info) {
Expand Down

0 comments on commit 1473641

Please sign in to comment.