Uh..... you want to panic instead of just exiting cleanly and printing an error message?
This is an improvement over the current error handling API?
There's a common idiom for using result::Result<T,E>
where you create a new type also called Result
that specifies the error type you want to use.
Is rewriting this to not return a specific exit code the best plan? I don't know if this ever worked as intended to cause the corresponding systemd units to fail and then bring the system into a state where the problem can be understood and diagnosed, but now the utility has an undefined exit code that we may end up relying on.
No, don't do that. It misleads reader to think there is a return value from both of these functions.
Ooops, you forgot to replace a libcitadel::error::Error
the 'improved' version and everything still works when you return it. Are you still sure rewriting everything was what you needed to do?
Why did you rewrite this? Why is this buried in a massive commit described vaguely as "improve error handling"?
When you mix reformatting changes in with code changes then I have to read the reformatting changes very carefully to make sure you haven't changed anything.