diff --git a/error.go b/error.go index b09903e8..0679c14b 100644 --- a/error.go +++ b/error.go @@ -24,7 +24,7 @@ const ( FormatUnavailable ErrorCode = C.GLFW_FORMAT_UNAVAILABLE // The clipboard did not contain data in the requested format. ) -// GlfwError holds error code and description. +// GLFWError holds error code and description. type GLFWError struct { Code ErrorCode Desc string @@ -33,7 +33,7 @@ type GLFWError struct { // Note: There are many cryptic caveats to proper error handling here. // See: https://github.com/go-gl/glfw3/pull/86 -// Holds the value of the last error +// Holds the value of the last error. var lastError = make(chan *GLFWError, 1) //export goErrorCB @@ -43,7 +43,7 @@ func goErrorCB(code C.int, desc *C.char) { select { case lastError <- err: default: - fmt.Printf("GLFW: An uncaught error has occurred: %d -> %s\n", err.Code, err.Desc) + fmt.Println("GLFW: An uncaught error has occurred:", err) fmt.Println("GLFW: Please report this bug in the Go package immediately.") } }