mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/cglfw: use stderr instead of log
This commit is contained in:
parent
aef7b0dd38
commit
cb023af4b6
@ -18,7 +18,7 @@ import "C"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
// ErrorCode corresponds to an error code.
|
||||
@ -178,13 +178,13 @@ func acceptError(codes ...ErrorCode) error {
|
||||
// package.
|
||||
switch err.Code {
|
||||
case platformError:
|
||||
log.Println(err)
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
return nil
|
||||
case notInitialized, noCurrentContext, invalidEnum, invalidValue, outOfMemory:
|
||||
panic(err)
|
||||
default:
|
||||
fmt.Println("GLFW: An invalid error was not accepted by the caller:", err)
|
||||
fmt.Println("GLFW: Please report this bug in the Go package immediately.")
|
||||
fmt.Fprintln(os.Stderr, "GLFW: An invalid error was not accepted by the caller:", err)
|
||||
fmt.Fprintln(os.Stderr, "GLFW: Please report this bug in the Go package immediately.")
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user