aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Gutekanst <stephen.gutekanst@gmail.com>2014-09-23 18:38:29 -0700
committerDmitri Shuralyov <shurcooL@gmail.com>2015-02-21 18:51:42 -0800
commit7913c17ac4a246be4eb0772b464127671c8e21d0 (patch)
tree4f3fbd7c64f89c27499cda63400199cef0bfaa5a
parent6e67bb3d677eb9cf033b65ac3ba31cf7624da5bc (diff)
downloadglfw-7913c17ac4a246be4eb0772b464127671c8e21d0.tar.gz
Cleanup the flushErrors function.
-rw-r--r--error.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/error.go b/error.go
index cafc762..b09903e 100644
--- a/error.go
+++ b/error.go
@@ -62,10 +62,9 @@ func init() {
// this ensures that any uncaught errors buffered in lastError are printed
// before the program exits.
func flushErrors() {
- e := fetchError()
- if e != nil {
- err := e.(*GLFWError)
- fmt.Printf("GLFW: An uncaught error has occurred: %d -> %s\n", err.Code, err.Desc)
+ err := fetchError()
+ if err != nil {
+ fmt.Println("GLFW: An uncaught error has occurred:", err)
fmt.Println("GLFW: Please report this bug in the Go package immediately.")
}
}