Skip to content

Commit

Permalink
std/net/httpd/server: catch and propagate errors in handler registration
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Nov 9, 2019
1 parent a206800 commit 6df4b4d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/std/net/httpd/server.ss
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@

(def (loop)
(<- ((!httpd.register host path handler k)
(put-handler! host path handler)
(!!value (void) k)
(try
(put-handler! host path handler)
(!!value (void) k)
(catch (e)
(!!error e k)))
(loop))
((!httpd.shutdown)
(void))
Expand Down

0 comments on commit 6df4b4d

Please sign in to comment.