diff options
author | Stephen Gutekanst <stephen.gutekanst@gmail.com> | 2014-09-23 18:38:29 -0700 |
---|---|---|
committer | Dmitri Shuralyov <shurcooL@gmail.com> | 2015-02-21 18:51:42 -0800 |
commit | 7913c17ac4a246be4eb0772b464127671c8e21d0 (patch) | |
tree | 4f3fbd7c64f89c27499cda63400199cef0bfaa5a | |
parent | 6e67bb3d677eb9cf033b65ac3ba31cf7624da5bc (diff) | |
download | glfw-7913c17ac4a246be4eb0772b464127671c8e21d0.tar.gz |
Cleanup the flushErrors function.
-rw-r--r-- | error.go | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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.") } } |