rclone: implement exit codes - #1136

This commit is contained in:
ishuah
2017-11-15 08:32:00 +03:00
parent 2423fa40e2
commit aec2265be0
12 changed files with 140 additions and 66 deletions

View File

@@ -142,7 +142,7 @@ type indexData struct {
// error returns an http.StatusInternalServerError and logs the error
func internalError(what interface{}, w http.ResponseWriter, text string, err error) {
fs.Stats.Error()
fs.Stats.Error(err)
fs.Errorf(what, "%s: %v", text, err)
http.Error(w, text+".", http.StatusInternalServerError)
}