1 2 3 4 5 6 7 8 9 10 11 12 13 | 1x 1x 4x 4x | import { FILTER_CATCH_EXCEPTIONS } from '../../constants'; import { Type } from '../../interfaces'; /** * Defines the Exceptions Filter. Takes set of exception types as an argument which has to be caught by this Filter. * The class should implement the `ExceptionFilter` interface. */ export function Catch(...exceptions: Type<any>[]): ClassDecorator { return (target: object) => { Reflect.defineMetadata(FILTER_CATCH_EXCEPTIONS, exceptions, target); }; } |