[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Revisiting Error handling (errexit)

From: Lawrence Velázquez
Subject: Re: Revisiting Error handling (errexit)
Date: Tue, 05 Jul 2022 20:36:34 -0400
User-agent: Cyrus-JMAP/3.7.0-alpha0-713-g1f035dc716-fm-20220617.001-g1f035dc7

On Tue, Jul 5, 2022, at 8:09 PM, Yair Lenga wrote:
> My opinion is that we should be looking at the expected behavior - for 
> a developer that want to implement ”strong”  error handling: any error 
> will break execution until explicitly handled. In the same spirit as 
> the ‘try … catch’ that from JavaScript, python, groovy, etc.
> [...]
> I think that all four cases, while each one matches different existing 
> bash command(s) (break, return, and ‘unwind’, and return+break) are 
> consistent with the accepted / expected pattern for try … catch, and 
> most developers will understand how to use it.

My opinion is that this notion of error handling is fundamentally
unsuitable for *nix shell programming and that it mostly just
cultivates a broken understanding of how to write shell scripts.
If it were up to me I would dismiss this proposal as flawed in its
very conception, but I'm just some rando who has too much time to
write emails and whose opinion should, by rights, hold less weight
than average.

> Hope it make sense. In any case, I would like to ask for some time 
> until additional community input/comments are sorted out. While the 
> final result may be different from where we started, I hope it will be 
> better.

You have plenty of time.  Things move deliberately here.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]