print errors in human-readable format

This commit is contained in:
piotr
2021-09-05 01:57:24 +02:00
parent aa227b51b8
commit 1be8e432fa
3 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@@ -216,7 +216,7 @@ func main() {
err = cssProvider.LoadFromPath(cssFile) err = cssProvider.LoadFromPath(cssFile)
if err != nil { if err != nil {
println(fmt.Sprintf("ERROR: %s css file not found or erroneous. Using GTK styling.", cssFile)) 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 { } else {
println(fmt.Sprintf("Using style from %s", cssFile)) println(fmt.Sprintf("Using style from %s", cssFile))
screen, _ := gdk.ScreenGetDefault() screen, _ := gdk.ScreenGetDefault()
@@ -240,7 +240,7 @@ func main() {
layershell.SetMonitor(win, monitor) layershell.SetMonitor(win, monitor)
} else { } else {
println(err) println(fmt.Sprintf("%s", err))
} }
} }

View File

@@ -49,7 +49,7 @@ func createPixbuf(icon string, size int) (*gdk.Pixbuf, error) {
if strings.Contains(icon, "/") { if strings.Contains(icon, "/") {
pixbuf, err := gdk.PixbufNewFromFileAtSize(icon, size, size) pixbuf, err := gdk.PixbufNewFromFileAtSize(icon, size, size)
if err != nil { if err != nil {
println(err) println(fmt.Sprintf("%s", err))
return nil, err return nil, err
} }
return pixbuf, nil return pixbuf, nil