Handle subprocess error with more information
This commit is contained in:
parent
1bc5ec5b73
commit
44497c7364
@ -21,7 +21,7 @@ func New(word, fromLang, toLang string) transJob {
|
||||
func (tj transJob) Translate() []string {
|
||||
outBytes, err := tj.execTrans()
|
||||
if err != nil {
|
||||
log.Fatal("Failed to execute command 'trans'!")
|
||||
log.Fatalf("Failed to execute command 'trans': %v", err)
|
||||
}
|
||||
return uniqueSlice(parseTransOutput(string(outBytes)))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user