From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM autolearn=no autolearn_force=no version=3.4.6 Received: from biznet-home.integral.gnuweeb.org (unknown [182.253.183.184]) by gnuweeb.org (Postfix) with ESMTPSA id CDDEA7E375; Sun, 8 Jan 2023 07:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1673162741; bh=C5IHVaNkz1ooFhbAgfTHBAgE1bp1T0XWA6tLfQF4Gis=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pXiWj1sUt9dB+NIqI70uJ6NtdGJ3KTnNGbCp06/oWyaq2Xm0Mb3vz5PrRMaZu2xpQ GsWWabB49ppVwf3w31v8z6R/YJ+f+XTZgDOC+1yh3LgsF8swd82YSChGUNA2/hJvYH vEklb/SCm6bpU7iTb3sxeFT/X8NI2a6+qFaXLINwtDIkCJRMqmbvbmToCtQs6bueW4 6WM2WpdXbrTgeMF5mlpwICTuh08zu/cgW2ibHQk9cGsg6ZktrjP2feVLpQp3fFJqmI 6enaRvf7Op685jB+idAt2iXs4VN5Cb4ZI0xCiaGtWPkKzm/YYFlQXQRjFH5bcFReZh D33xJZ0mAO1Sw== Date: Sun, 8 Jan 2023 14:25:36 +0700 From: Ammar Faizi To: Alviro Iskandar Setiawan Cc: Muhammad Rizki , GNU/Weeb Mailing List Subject: Re: [PATCH v2 05/11] telegram: Implement the DaemonException() and refactor report_err() Message-ID: References: <20230108061543.1780-1-kiizuha@gnuweeb.org> <20230108061543.1780-6-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: [ Resending this, just not to make you misunderstand, please don't ignore. The previous message doesn't have a call to e.set_message() ] On Sun, Jan 08, 2023 at 02:15:38PM +0700, Alviro Iskandar Setiawan wrote: > Maybe you need to give a small pseudo-code so it's clear to him. Like I didn't? I definitely did that. Please stop this retardation. I'm very tired of getting ignored when giving reviews. Let me emphasize it with a block of comment this time. url = None try: for url in self.db.get_atom_urls(): await self.__handle_atom_url(url) except (OperationalError, DatabaseError) as e: await self.handle_db_error(e) except DaemonException as e: e.set_atom_url(url) await self.client.report_err(e) except: # # This is needed because if an exception is # raised inside self.db.get_atom_urls(), we # will catch it here. # # At this point, we have an atom_url, but # no thread_url. # e = DaemonException() e.set_atom_url(url) e.set_thread_url(None) e.set_message(utils.catch_err()) await self.client.report_err(e) > My understanding will be adding an "except" statement without specifying > any exception class name, no? Yes, you are correct. -- Ammar Faizi