Skip to content

Commit 7f5bb7d

Browse files
committed
feat(handler): add exception handler class
1 parent 9c4be0e commit 7f5bb7d

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenna/common",
3-
"version": "5.29.0",
3+
"version": "5.30.0",
44
"description": "The Athenna common helpers to use in any Node.js ESM project.",
55
"license": "MIT",
66
"author": "João Lenon <lenon@athenna.io>",

src/handlers/ExceptionHandler.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Macroable } from '#src/helpers/Macroable'
2+
3+
export type ExceptionHandlerContext = {
4+
error: any
5+
}
6+
7+
export class ExceptionHandler extends Macroable {
8+
public async handle(context: ExceptionHandlerContext): Promise<void> {
9+
throw new Error('Not implemented')
10+
}
11+
}

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ export * from '#src/helpers/Sleep'
4040
export * from '#src/helpers/String'
4141
export * from '#src/helpers/Uuid'
4242
export * from '#src/helpers/Ulid'
43+
44+
export * from '#src/handlers/ExceptionHandler'

0 commit comments

Comments
 (0)