[Exherbo-dev] support dying in eclasses in global space

Saleem Abdulrasool compnerd at compnerd.org
Sun Jul 13 02:46:34 BST 2008

Currently, you cant die in an exlib in global space, which makes it impossible
to assert that an exheres passes in any data it must.  Discussing this with
ciaranm, brought up the following:

- This information needs to be saved as part of the metadata
- It should be quiet on user's machines

We could add a new metadata key EXHERES_ERRORS which lists any fatal errors that
have been encountered while sourcing the exheres.  In order to simplify the
implementation (and catch all errors at once), we continue sourcing even when an
error has been raised.  When this key is not empty, the exheres would simply be

[[ -n "${REQUIRED_PARAMETER}" ]] || exerror "Expected REQUIRED_PARAMETER to be set, but it isnt"

While adding this, we could also, optionally, add support for non-fatal
errors/notices/warnings.  A possible place where such functionality may be
helpful is with marking deprecated functions.

   exwarning "deprecated_function is deprecated.  Please use new_function instead"


Saleem Abdulrasool
compnerd (at) compnerd (dot) org

More information about the Exherbo-dev mailing list