Skip to content

Commit

Permalink
feat(msar): OutputError
Browse files Browse the repository at this point in the history
Collect all errors related to output using CustomError for easier debugging
  • Loading branch information
battis committed Jan 3, 2025
1 parent 9a58711 commit 80a09b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/msar/src/common/output.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * as args from './output/args.js';
export * from './output/avoidOverwrite.js';
export { filePathFromOutputPath } from './output/filePathFromOutputPath.js';
export * from './output/OutputError.js';
export { pathsafeTimestamp } from './output/pathsafeTimestamp.js';
export { writeFetchedFile } from './output/writeFetchedFile.js';
export { writeJSON } from './output/writeJSON.js';
Expand Down
7 changes: 7 additions & 0 deletions packages/msar/src/common/output/OutputError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { CustomError } from '../CustomError.js';

export class OutputError extends CustomError {
public constructor(message?: string) {
super('Output options have not been defined', message);
}
}

0 comments on commit 80a09b7

Please sign in to comment.