Exit with a non-zero exit status if a given mail does not exist #265
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sadly, the diff is quite large as we will have to change the API of
blaze822_loop
to differentiate the number of processed messages and a status code indicating a missing mail. Note that currently execution is not aborted upon encountering the first non-existent mail; hence, we can't do both via the return value.Surprisingly, very few utilities actually use the number of processed messages as returned by
blaze822_loop
. Therefore, we could reduce the diff quite a bit by differentiating the two use cases through separate functions (e.g.blaze822_loop
andblaze822_loop_num
), which would allow the API of blaze822_loop to remain largely unchanged.The new
blaze822_loop
API would also allow us to improve error handling forblaze822_seq_next
but I haven't done this so far…There are also some tests, but these should be expanded.
Fixes #264