fix error strings

This commit is contained in:
Anand Babu (AB) Periasamy
2015-07-19 15:27:30 -07:00
parent aa8c846224
commit f2434591d9
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ func checkCastSyntax(ctx *cli.Context) {
}
if !srcContent.Type.IsRegular() {
if srcContent.Type.IsDir() {
console.Fatalf("Source ‘%s’ is a directory. Please use ‘%s...’ ellipses sufix to copy a directory and its contents recursively.\n", srcURL, srcURL)
console.Fatalf("Source ‘%s’ is a directory. Please use ‘%s...’ to recursively copy this directory and its contents.\n", srcURL, srcURL)
}
console.Fatalf("Source ‘%s’ is not a regular file.\n", srcURL)
}
@@ -123,7 +123,7 @@ func checkCastSyntax(ctx *cli.Context) {
console.Fatalf("Unable to stat source ‘%s’. %s\n", srcURL, iodine.New(err, nil))
}
if srcContent.Type.IsRegular() { // Elipses is supported only for directories.
if srcContent.Type.IsRegular() { // Ellipses is supported only for directories.
console.Fatalf("Source ‘%s’ is not a directory. %s\n", stripRecursiveURL(srcURL), iodine.New(err, nil))
}
// All targets should be a valid folder.
+6 -6
View File
@@ -103,21 +103,21 @@ var (
// Fatal print a error message and exit
Fatal = func(data ...interface{}) {
defer os.Exit(1)
print(themesDB[currThemeName].Error, data...)
print(themesDB[currThemeName].Fatal, data...)
return
}
// Fatalf print a error message with a format specified and exit
Fatalf = func(f string, data ...interface{}) {
defer os.Exit(1)
printf(themesDB[currThemeName].Error, f, data...)
printf(themesDB[currThemeName].Fatal, f, data...)
return
}
// Fatalln print a error message with a new line and exit
Fatalln = func(data ...interface{}) {
defer os.Exit(1)
println(themesDB[currThemeName].Error, data...)
println(themesDB[currThemeName].Fatal, data...)
return
}
@@ -212,7 +212,7 @@ var (
mutex.Lock()
output := color.Output
color.Output = stderrColoredOutput
c.Print(ProgramName() + ": <FATAL> ")
c.Print(ProgramName() + ": <ERROR> ")
c.Print(a...)
color.Output = output
mutex.Unlock()
@@ -251,7 +251,7 @@ var (
mutex.Lock()
output := color.Output
color.Output = stderrColoredOutput
c.Print(ProgramName() + ": <FATAL> ")
c.Print(ProgramName() + ": <ERROR> ")
c.Printf(f, a...)
color.Output = output
mutex.Unlock()
@@ -290,7 +290,7 @@ var (
mutex.Lock()
output := color.Output
color.Output = stderrColoredOutput
c.Print(ProgramName() + ": <FATAL> ")
c.Print(ProgramName() + ": <ERROR> ")
c.Println(a...)
color.Output = output
mutex.Unlock()