Catch
Decorator that marks a class as a Nest exception filter. An exception filter handles exceptions thrown by or not handled by your application code.
@Catch(...exceptions: (Type<any> | Abstract<any>)[])
Parameters
Option | Type | Description |
---|---|---|
exceptions
|
(Type |
one or more exception types specifying the exceptions to be caught and handled by this filter. |
Returns
ClassDecorator
See also
Description
The decorated class must implement the ExceptionFilter
interface.
Further information is available in the Usage Notes...
Usage notes
Exception filters are applied using the @UseFilters()
decorator, or (globally)
with app.useGlobalFilters()
.