Skip to content

Commit 1295ebc

Browse files
authored
Merge pull request #208 from gflohr/204-verbose-outputdebugging
show more diagnostics
2 parents aedcb9a + 7777cce commit 1295ebc

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

apps/cli/src/commands/invoice.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,21 @@ export class Invoice implements Command {
376376
await this.doRun(configOptions);
377377
return 0;
378378
} catch (e) {
379-
console.error(
380-
gtx._x('{programName}: {error}', {
381-
programName: Package.getName(),
382-
error: e,
383-
}),
384-
);
379+
if (e.ajv) {
380+
console.error(
381+
gtx._x('{programName}: fatal error:', {
382+
programName: Package.getName(),
383+
}),
384+
e.errors,
385+
);
386+
} else {
387+
console.error(
388+
gtx._x('{programName}: {error}', {
389+
programName: Package.getName(),
390+
error: e,
391+
}),
392+
);
393+
}
385394

386395
return 1;
387396
}

0 commit comments

Comments
 (0)