balena-supervisor/test/lib/errors.ts
Theodor Gherzan d6adfa189f
Do not polute test output with unncessarry stack trace
Signed-off-by: Theodor Gherzan <theodor@balena.io>
2019-11-19 09:48:56 +00:00

9 lines
192 B
TypeScript

import TypedError = require('typed-error');
export default class ShortStackError extends TypedError {
constructor(err: Error | string = '') {
Error.stackTraceLimit = 1;
super(err);
}
}