log plugin errors

This commit is contained in:
Unrud 2018-07-31 20:19:05 +02:00
parent fe568cd37c
commit 2eb0baaca1
6 changed files with 25 additions and 15 deletions

View file

@ -43,7 +43,8 @@ type x11Plugin struct {
func InitX11Plugin() (Plugin, error) {
display := C.XOpenDisplay(nil)
if display == nil {
return nil, UnsupportedPlatformError{"X11", "failed to connect to X server"}
return nil, UnsupportedPlatformError{
errors.New("failed to connect to X server")}
}
return &x11Plugin{display: display}, nil
}