stratis-storage/stratis-cli

We might as well use a decorator to raise StratisCliEngineError at end of method

Closed this issue · 1 comments

We could do this for all methods that actually invoke an engine method. Such methods will either raise an exception or they will return the result of the engine method call. We could modify these methods to return the triple returned by the engine call. Then the decorator can do its further processing.

This would be more programmatic and a little less boiler-platey, so it would be more obvious that such methods were doing the correct thing.

Glad we didn't do this. With ongoing work in #321, it's pretty clear that that would have led to some awkward code, as it is now the check for whether or not a change has occurred which comes at the very end of these action methods.