bug-bash
[Top][All Lists]
Advanced

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

Re: Revisiting Error handling (errexit)


From: Martin D Kealey
Subject: Re: Revisiting Error handling (errexit)
Date: Wed, 6 Jul 2022 18:24:15 +1000

Modules can have conflicting requirements of global settings that require
weird contortions to interoperate; so starting out by making this yet
another global setting seems like a retrograde step.

So I would like to propose an alternative approach.

Firstly, I would reduce the action to simply "return from function upon
unchecked failure"; the issue is primarily with *invisible* behaviour at a
difference making this difficult to debug.

Secondly I would set this as a per-function attribute, rather than as a
global setting outside the function.

Perhaps

function -E funcname { … }


reply via email to

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