Prefix error messages with mc: part of #286

This commit is contained in:
Harshavardhana
2015-04-16 15:53:33 -07:00
parent 0702f392ba
commit 0935573255
9 changed files with 46 additions and 36 deletions
+3 -1
View File
@@ -23,6 +23,7 @@ import (
"sync"
"github.com/fatih/color"
"github.com/minio-io/minio/pkg/iodine"
)
var (
@@ -101,7 +102,8 @@ func isValidTheme(themeName string) bool {
// SetTheme sets a color theme
func SetTheme(themeName string) error {
if !isValidTheme(themeName) {
return errors.New("Invalid theme")
msg := fmt.Sprintf("invalid theme: %s", themeName)
return iodine.New(errors.New(msg), nil)
}
currentTheme = themeName
mutex.Lock()