print errors in human-readable format
This commit is contained in:
BIN
bin/nwg-drawer
BIN
bin/nwg-drawer
Binary file not shown.
4
main.go
4
main.go
@@ -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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
tools.go
2
tools.go
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user