@nestjs/common
Version:
Nest - modern, fast, powerful node.js web framework (@common)
14 lines (13 loc) • 488 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const constants_1 = require("../../constants");
/**
* Defines an exception filter. Takes set of exception types as arguments which have to be caught by this filter.
* The class should implement the `ExceptionFilter` interface.
*/
function Catch(...exceptions) {
return (target) => {
Reflect.defineMetadata(constants_1.FILTER_CATCH_EXCEPTIONS, exceptions, target);
};
}
exports.Catch = Catch;