Skip to content

Commit

Permalink
Minor cleanup.
Browse files Browse the repository at this point in the history
Change error printing to be consistent with
65a04fa.
  • Loading branch information
dmitshur committed Feb 22, 2015
1 parent 7913c17 commit 1babc43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.")
}
}
Expand Down

0 comments on commit 1babc43

Please sign in to comment.