Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
TRY_BLOCK_ERROR and exit status
On Nov 23, 7:08pm, Mikael Magnusson wrote:
}
} % { $(< foo) } always { TRY_BLOCK_ERROR=0 }; echo hello
} zsh: no such file or directory: foo
} hello
}
} However, I'm not sure how to
} make the construct return false when it failed with a fatal error.
Arguably a fatal error should set both errflag and lastval nonzero, but
that might require a lot of tiny changes all over the place ... on the
other hand I think always+TRY_BLOCK_ERROR is the only way lastval can
still be examined after errflag has been set, so maybe it would suffice
to handle this there?
What should the value of lastval ($?) be in this circumstance?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author