Skip to content

Commit

Permalink
Improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
boppreh committed Mar 7, 2016
1 parent 3858bcc commit d641488
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions steamgrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ import (

// Prints an error and quits.
func errorAndExit(err error) {
panic(err.Error())
fmt.Println(err.Error())
bufio.NewReader(os.Stdin).ReadBytes('\n')
os.Exit(0)
}

func main() {
Expand All @@ -32,7 +34,7 @@ func startApplication() {
if len(overlays) == 0 {
// I'm trying to use a message box here, but for some reason the
// message appears twice and there's an error a closed channel.
fmt.Println("No overlays", "No category overlays found. You can put overlay images in the folder 'overlays by category', where the filename is the game category.\n\nContinuing without overlays...")
fmt.Println("No category overlays found. You can put overlay images in the folder 'overlays by category', where the filename is the game category.\n\nContinuing without overlays...")
}

fmt.Println("Looking for Steam directory...")
Expand Down
2 changes: 1 addition & 1 deletion users.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,5 @@ func GetSteamInstallation() (path string, err error) {
return programFilesDir, nil
}

return "", errors.New("Could not find Steam installation folder. You can drag and drop the Steam folder into `steamgrid.exe` for a manual override.")
return "", errors.New("Could not find Steam installation folder. You can drag and drop the Steam folder into `steamgrid.exe` or call `steamgrid STEAMPATH` for a manual override.")
}

0 comments on commit d641488

Please sign in to comment.