feat!(): add custom execution context

This commit is contained in:
Morb0
2021-01-03 01:30:57 +03:00
parent 85bb916709
commit af632ea471
64 changed files with 899 additions and 69 deletions

View File

@@ -0,0 +1,11 @@
import { ArgumentsHost, Catch, ExceptionFilter } from '@nestjs/common';
import { TelegrafArgumentsHost, TelegrafException } from '../../../lib';
@Catch()
export class TelegrafExceptionFilter<T> implements ExceptionFilter {
catch(exception: T, host: ArgumentsHost) {
const tgHost = TelegrafArgumentsHost.create(host);
console.log(tgHost);
return exception;
}
}