Skip to content

Commit

Permalink
Cleanup the flushErrors function.
Browse files Browse the repository at this point in the history
  • Loading branch information
emidoots committed Sep 24, 2014
1 parent 18db25c commit 65a04fa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
}
Expand Down

0 comments on commit 65a04fa

Please sign in to comment.