mirror of
https://github.com/tenox7/wrp.git
synced 2025-01-05 19:32:28 +00:00
log encode errors
This commit is contained in:
parent
546e686cbc
commit
df400d57b3
7
wrp.go
7
wrp.go
@ -96,7 +96,12 @@ func capture(gourl string, out http.ResponseWriter) {
|
||||
return
|
||||
}
|
||||
gifbuf.Reset()
|
||||
gif.Encode(&gifbuf, img, nil)
|
||||
err = gif.Encode(&gifbuf, img, nil)
|
||||
if err != nil {
|
||||
log.Printf("Failed to encode GIF: %s\n", err)
|
||||
fmt.Fprintf(out, "<BR>Unable to encode GIF:<BR>%s<BR>\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
base, _ := url.Parse(loc)
|
||||
fmt.Fprintf(out, "<IMG SRC=\"/wrp.gif\" ALT=\"wrp\" USEMAP=\"#map\">\n<MAP NAME=\"map\">\n")
|
||||
|
Loading…
Reference in New Issue
Block a user