From 9003353b9ec7976b4209f01adca623324aeb6af8 Mon Sep 17 00:00:00 2001 From: Danipulok Date: Mon, 16 Jan 2023 16:15:20 +0200 Subject: [PATCH] Add `CHANGES` --- CHANGES/1099.doc.rst | 1 + examples/error_handling.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 CHANGES/1099.doc.rst diff --git a/CHANGES/1099.doc.rst b/CHANGES/1099.doc.rst new file mode 100644 index 00000000..e13746d3 --- /dev/null +++ b/CHANGES/1099.doc.rst @@ -0,0 +1 @@ +Add error handling example `examples/error_handling.py` diff --git a/examples/error_handling.py b/examples/error_handling.py index 211df999..72ab8e34 100644 --- a/examples/error_handling.py +++ b/examples/error_handling.py @@ -3,10 +3,9 @@ import html import logging from aiogram import Bot, Dispatcher, types -from aiogram.filters import Command, ExceptionTypeFilter, CommandObject, ExceptionMessageFilter +from aiogram.filters import Command, CommandObject, ExceptionMessageFilter, ExceptionTypeFilter from aiogram.types import ErrorEvent - TOKEN = "42:TOKEN" dp = Dispatcher() @@ -19,7 +18,6 @@ class InvalidAge(Exception): class InvalidName(Exception): - def __init__(self, message: str): super().__init__(message)