Implement error-specific exit codes

This commit is contained in:
2024-08-11 20:21:01 -04:00
parent 06b9527a33
commit ed9c4e91ff
18 changed files with 102 additions and 88 deletions
+14
View File
@@ -13,3 +13,17 @@ const (
AnsiReset = "\033[0m"
LibmuttonVersion = "0.2.B" // untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1"
)
// numeric error codes legend
// 0: no error
// 101: read error
// 102: write error
// 103: sync process error
// 104: server connection error
// 105: target not found
// 106: target already exists
// 107: target wrong type (file/directory)
// 108: decryption error
// 109: encryption error
// 110: clipboard error
// 111: other error