Skip to content

Commit

Permalink
print errors in human-readable format
Browse files Browse the repository at this point in the history
  • Loading branch information
nwg-piotr committed Sep 4, 2021
1 parent aa227b5 commit 1be8e43
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file modified bin/nwg-drawer
Binary file not shown.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func main() {
err = cssProvider.LoadFromPath(cssFile)
if err != nil {
println(fmt.Sprintf("ERROR: %s css file not found or erroneous. Using GTK styling.", cssFile))
println(fmt.Sprintf(">>> %s", err))
println(fmt.Sprintf("%s", err))
} else {
println(fmt.Sprintf("Using style from %s", cssFile))
screen, _ := gdk.ScreenGetDefault()
Expand All @@ -240,7 +240,7 @@ func main() {
layershell.SetMonitor(win, monitor)

} else {
println(err)
println(fmt.Sprintf("%s", err))
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func createPixbuf(icon string, size int) (*gdk.Pixbuf, error) {
if strings.Contains(icon, "/") {
pixbuf, err := gdk.PixbufNewFromFileAtSize(icon, size, size)
if err != nil {
println(err)
println(fmt.Sprintf("%s", err))
return nil, err
}
return pixbuf, nil
Expand Down

0 comments on commit 1be8e43

Please sign in to comment.