Implement utility function for formatting and printing errors

This commit is contained in:
2025-02-01 20:48:03 -05:00
parent 173574eb85
commit e9d0c37043
18 changed files with 84 additions and 159 deletions
+1 -2
View File
@@ -17,8 +17,7 @@ func GetRemoteDataFromServer(clientDeviceID string) {
modList := getModTimes(entryList)
deletionsList, err := os.ReadDir(core.ConfigDir + core.PathSeparator + "deletions")
if err != nil {
fmt.Println(core.AnsiError+"Failed to read the deletions directory:", err.Error()+core.AnsiReset)
os.Exit(core.ErrorRead)
core.PrintError("Failed to read the deletions directory: "+err.Error(), core.ErrorRead, true)
}
// print the current UNIX timestamp to stdout