mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 18:52:44 +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 (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrorCode corresponds to an error code.
|
// ErrorCode corresponds to an error code.
|
||||||
@ -178,13 +178,13 @@ func acceptError(codes ...ErrorCode) error {
|
|||||||
// package.
|
// package.
|
||||||
switch err.Code {
|
switch err.Code {
|
||||||
case platformError:
|
case platformError:
|
||||||
log.Println(err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
return nil
|
return nil
|
||||||
case notInitialized, noCurrentContext, invalidEnum, invalidValue, outOfMemory:
|
case notInitialized, noCurrentContext, invalidEnum, invalidValue, outOfMemory:
|
||||||
panic(err)
|
panic(err)
|
||||||
default:
|
default:
|
||||||
fmt.Println("GLFW: An invalid error was not accepted by the caller:", err)
|
fmt.Fprintln(os.Stderr, "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: Please report this bug in the Go package immediately.")
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user