stratis-storage/stratis-cli

Abstract error codes construction

mulkieran opened this issue · 1 comments

Presently we have three prefixes, "I", "E", "W" with the usual interpretations. But we don't abstract them, we just include them in the error string.

We need to define some enum probably, with these three constants, and then we need to use these constants when forming the error string.

We might also want to define constants for the second portion of the string, which is a two character chunk which has some relation to the problem. For example, in a pool, "DS" stands for "device size".

#906 has added just enough error code constructions to make this effort worthwhile.