Assign error-specific exit codes to constants

This commit is contained in:
2024-08-13 20:48:20 -04:00
parent a1c9827c04
commit 4c54349b39
17 changed files with 90 additions and 92 deletions
+12 -14
View File
@@ -16,19 +16,17 @@ const (
AnsiError = "\033[38;5;9m"
AnsiReset = "\033[0m"
ErrorRead = 101
ErrorWrite = 102
ErrorSyncProcess = 103
ErrorServerConnection = 104
ErrorTargetNotFound = 105
ErrorTargetExists = 106
ErrorTargetWrongType = 107
ErrorDecryption = 108
ErrorEncryption = 109
ErrorClipboard = 110
ErrorOther = 111
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