在template中增加了exceptionHandler

This commit is contained in:
Xu Chang 2022-04-25 13:48:23 +08:00
parent 4d6c25aeca
commit 40c8a4f069
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,9 @@
import { ExceptionRouters } from 'oak-frontend-base';
import { exceptionRouters as GenenralExceptionRouters } from 'oak-general-business';
import { ExampleException } from './types/Exception';
export const routers = ([
[ExampleException, {
router: '/url/url',
}]
] as ExceptionRouters).concat(GenenralExceptionRouters);

View File

@ -0,0 +1,3 @@
import { OakException } from "oak-domain/lib/types";
export class ExampleException extends OakException {};