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 AF9857E375; Sun, 8 Jan 2023 07:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1673162601; bh=Qg5mLWTtGHyciDDktQLNDF2aEU5g0H6IMYb+bXr1UBQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SpowBhVC3z67MEsniiEN5UhGaGYFXKzzDYOSJYgZ+AnE0yBSIwvdMUD2IqX/y9VPC Uzs3s6ZvLI9jOe3+A+CzPuNuR+j6LKnWlzLsVSaIAP6T5xrMm8S6O4sXIwOAVcaUdo Kr4Xbc2IsihkRfY5aqdtnHUE5l2PVcRw1bCUnHPjd/TWnypseg+I5cwHqQXK6DYMZG 3XqxWS6fk2TZYQOVmeDmCq1jWcAIFWj9pBeUQWB9SkdNJL87QVjrGV79YvvK6VRCL2 RBOOow2qTMJwYPoXKzuCPu3LYdv39KPRnZ5CcQjPb7+vOgi0XgsA4ijRGbdiRk/96v N6jOt3U2Pf0QA== Date: Sun, 8 Jan 2023 14:23:16 +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: 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) 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