ebitenutil: Modify error message on load resources (JS)

This commit is contained in:
Hajime Hoshi 2015-02-02 02:58:09 +09:00
parent 2132925b88
commit 16e5b3f37e

View File

@ -43,8 +43,7 @@ func NewImageFromFile(path string, filter ebiten.Filter) (*ebiten.Image, image.I
}) })
req.Call("addEventListener", "error", func() { req.Call("addEventListener", "error", func() {
defer close(ch) defer close(ch)
// TODO: Add more information. err = errors.New(fmt.Sprintf("XMLHttpRequest error: %s", req.Get("statusText").String()))
err = errors.New("http error")
}) })
req.Call("send") req.Call("send")
<-ch <-ch