mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-24 22:30:58 +00:00
add todos for error handling
This commit is contained in:
parent
b571df7a37
commit
ecb2cc0c06
6
wrp.go
6
wrp.go
@ -219,6 +219,8 @@ func (rq *wrpReq) navigate() {
|
|||||||
|
|
||||||
// Handle context errors
|
// Handle context errors
|
||||||
func ctxErr(err error, w io.Writer) {
|
func ctxErr(err error, w io.Writer) {
|
||||||
|
// TODO: callers should have retry logic, perhaps create another function
|
||||||
|
// that takes ...chromedp.Action and retries with give up
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -381,7 +383,7 @@ func pageServer(w http.ResponseWriter, r *http.Request) {
|
|||||||
rq.printHTML(printParams{bgColor: "#FFFFFF"})
|
rq.printHTML(printParams{bgColor: "#FFFFFF"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
rq.navigate()
|
rq.navigate() // TODO: if error from navigate do not capture
|
||||||
rq.capture()
|
rq.capture()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,7 +412,7 @@ func mapServer(w http.ResponseWriter, r *http.Request) {
|
|||||||
rq.printHTML(printParams{bgColor: "#FFFFFF"})
|
rq.printHTML(printParams{bgColor: "#FFFFFF"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
rq.navigate()
|
rq.navigate() // TODO: if error from navigate do not capture
|
||||||
rq.capture()
|
rq.capture()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user