Deutsch English Français Italiano |
<102793e$q49$1@rasp.pasdenom.info> View for Bookmarking (what is this?) Look up another Usenet article |
Path: nntp.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.os.vms Subject: Re: VMS x86-64 database server Date: Fri, 11 Jul 2025 02:54:36 -0000 (UTC) Organization: A noiseless patient Spider Lines: 22 Message-ID: <104pudc$1a2qo$2@dont-email.me> References: <104ejo8$2cobv$1@dont-email.me> <686af3b4$0$686$14726298@news.sunsite.dk> <104f0a6$2gn2r$5@dont-email.me> <104f2ic$2h75q$2@dont-email.me> <104fc66$2n4ir$2@dont-email.me> <104h2d1$31cae$2@dont-email.me> <104hgeh$3474l$11@dont-email.me> <104hl76$3595d$2@dont-email.me> <104hojt$360c1$1@dont-email.me> <686d12d9$0$694$14726298@news.sunsite.dk> <104k487$3p7d8$8@dont-email.me> <104k6p0$3pmuk$1@dont-email.me> <104ka6h$3qkfr$5@dont-email.me> <104ki4c$3r3fl$1@dont-email.me> <104l5i4$4bv9$2@dont-email.me> <686ec41e$0$686$14726298@news.sunsite.dk> <104msna$fd02$9@dont-email.me> <686f0082$0$686$14726298@news.sunsite.dk> <104n4jb$gs8r$2@dont-email.me> <686f2472$0$686$14726298@news.sunsite.dk> <104nfgt$mfqt$1@dont-email.me> <68704746$0$690$14726298@news.sunsite.dk> <104pk28$14565$3@dont-email.me> <104pksf$13i9u$3@dont-email.me> <104plb1$14565$4@dont-email.me> <6870596c$0$690$14726298@news.sunsite.dk> <104plsf$14565$6@dont-email.me> <104pme5$13i9t$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 11 Jul 2025 04:54:37 +0200 (CEST) Injection-Info: dont-email.me; posting-host="43fd2828d9121e4d4576270751fd7421"; logging-data="1379160"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MgZJbRudLg8Zg1jnMo5bS" User-Agent: Pan/0.162 (Pokrosvk) Cancel-Lock: sha1:AJOeP4afu5gJrBBJsfw+q3Oxw6M= On Thu, 10 Jul 2025 20:38:29 -0400, Arne Vajhøj wrote: > The ability to subclass exceptions to catch specific and the ability > to rethrow exceptions are quite common. Not Python specific at all. > > Java use sub-classing extensively for database. A little simplified: > > |->SQLNonTransientException->non transient exception classses > SQLException-| > |->SQLTransientException->transient exception classses > Python has metaclasses. These make it easy to set up an exception hierarchy based on status codes (or other criteria). A subclass definition can be as simple as class HangupNetworkTrouble(HangupCause) : _CODES_ = {2, 3, 38, 42} #end HangupNetworkTrouble Now if the status code is one of those listed, any instantiation of the base class will automatically delegate to this subclass.