File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 4.1.4
2+ - ** common** : remove deprecated ` @ExceptionFilters() ` decorator
3+
14## 4.1.3
25- ** core** : forward reference bugfixes & security updates
36
Original file line number Diff line number Diff line change 11import 'reflect-metadata' ;
22import { expect } from 'chai' ;
33import { EXCEPTION_FILTERS_METADATA } from '../../constants' ;
4- import { ExceptionFilters } from '../../utils/decorators/exception-filters.decorator' ;
4+ import { UseFilters } from '../../utils/decorators/exception-filters.decorator' ;
55
6- describe ( '@ExceptionFilters ' , ( ) => {
6+ describe ( '@UseFilters ' , ( ) => {
77 const filters = [ 'exception' , 'exception2' ] ;
88
9- @ExceptionFilters ( ...filters as any ) class Test { }
9+ @UseFilters ( ...filters as any ) class Test { }
1010
1111 class TestWithMethod {
12- @ExceptionFilters ( ...filters as any )
12+ @UseFilters ( ...filters as any )
1313 public static test ( ) { }
1414 }
1515
Original file line number Diff line number Diff line change @@ -14,16 +14,6 @@ const defineFiltersMetadata = (...filters: ExceptionFilter[]) => {
1414 } ;
1515} ;
1616
17- /**
18- * @deprecated
19- * Since version 2.1.2 this decorator is deprecated. Use @UseFilters() instead.
20- */
21- export const ExceptionFilters = ( ...filters : ExceptionFilter [ ] ) => {
22- const logger = new Logger ( 'ExceptionFilters' ) ;
23- logger . warn ( 'DEPRECATED! Since version 2.1.2 `@ExceptionFilters()` decorator is deprecated. Use `@UseFilters()` instead.' ) ;
24- return defineFiltersMetadata ( ...filters ) ;
25- } ;
26-
2717/**
2818 * Setups exception filters to the chosen context.
2919 * When the `@UseFilters()` is used on the controller level:
You can’t perform that action at this time.
0 commit comments