diff options
Diffstat (limited to 'app/Exceptions/Handler.ts')
-rw-r--r-- | app/Exceptions/Handler.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/Exceptions/Handler.ts b/app/Exceptions/Handler.ts new file mode 100644 index 0000000..35c77d0 --- /dev/null +++ b/app/Exceptions/Handler.ts | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | |-------------------------------------------------------------------------- | ||
3 | | Http Exception Handler | ||
4 | |-------------------------------------------------------------------------- | ||
5 | | | ||
6 | | AdonisJs will forward all exceptions occurred during an HTTP request to | ||
7 | | the following class. You can learn more about exception handling by | ||
8 | | reading docs. | ||
9 | | | ||
10 | | The exception handler extends a base `HttpExceptionHandler` which is not | ||
11 | | mandatory, however it can do lot of heavy lifting to handle the errors | ||
12 | | properly. | ||
13 | | | ||
14 | */ | ||
15 | |||
16 | import Logger from '@ioc:Adonis/Core/Logger'; | ||
17 | import HttpExceptionHandler from '@ioc:Adonis/Core/HttpExceptionHandler'; | ||
18 | |||
19 | export default class ExceptionHandler extends HttpExceptionHandler { | ||
20 | constructor() { | ||
21 | super(Logger); | ||
22 | } | ||
23 | } | ||