Path: news.eternal-september.org!eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero Newsgroups: comp.lang.c Subject: Re: do { quit; } else { } Date: Fri, 9 May 2025 19:45:29 +0200 Organization: A noiseless patient Spider Lines: 12 Message-ID: References: <8634enhcui.fsf@linuxsc.com> <86ldsdfocs.fsf@linuxsc.com> <20250406162607.0000657a@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 09 May 2025 19:45:29 +0200 (CEST) Injection-Info: raubtier-asyl.eternal-september.org; posting-host="4ca603212741b472c47a42c9eb719f99"; logging-data="3102805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ham8idUu5BuSisJb2W0y+hN9pAMbkBdY=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:x5bpuOOz5u8cNMrhOdrN5ubFZWU= Content-Language: de-DE In-Reply-To: Am 06.04.2025 um 21:53 schrieb Thiago Adams: > I have asked the same question here before. It can be implemented using > macros. > > #define try > #define catch if (0) catch_label: > #define throw do { throw_break_point(); goto catch_label;}while (0) Exceptions make sense if you leave the scope of a single function through an exception. Within a function this additional macro-com- plexity isn't necessary.