Add error logging for http server

This commit is contained in:
Leonid Bugaev
2013-08-16 12:53:16 +04:00
parent 041c20ef38
commit af2d47817b
+5 -1
View File
@@ -76,7 +76,11 @@ func (e *Env) startReplay(port int, forwardPort int) {
}
func (e *Env) startHTTP(port int, handler http.Handler) {
http.ListenAndServe(":"+strconv.Itoa(port), handler)
err := http.ListenAndServe(":"+strconv.Itoa(port), handler)
if err != nil {
fmt.Println("Error while starting http server:", err)
}
}
func getRequest(port int) *http.Request {