Skip to content

Commit

Permalink
feat: add custom evaluation error
Browse files Browse the repository at this point in the history
  • Loading branch information
IamSebastianDev committed Dec 11, 2022
1 parent eb0436b commit a1a7bd8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/utils/Errors/FlotsamEvaluationError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @format */

import { FlotsamError } from './FlotsamError';

export class FlotsamEvaluationError extends FlotsamError {
public name: string = 'FlotsamEvaluationError';

constructor(message: string) {
super(`\x1b[31m[Error][Query]\x1b[0m ${message}`);
}
}
1 change: 1 addition & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ export { sortByProperty } from './sortByProperty.util';
export { isDocument } from './isDocument.util';
export { FlotsamValidationError } from './Errors/FlotsamValidationError';
export { FlotsamOperationError } from './Errors/FlotsamOperationError';
export { FlotsamEvaluationError } from './Errors/FlotsamEvaluationError';

0 comments on commit a1a7bd8

Please sign in to comment.