3 ms·
https://github.com/0install/0repo-queue/blob/master/unikernel.ml#L19 https://github.com/0install/0repo-queue/blob/master/unikerne... is this safe? Coming from m
by lclarkmichalek 12y ago
https://github.com/0install/0repo-queue/blob/master/unikernel.ml#L19 https://github.com/0install/0repo-queue/blob/master/unikerne... is this safe? Coming from my haskell background, I'd expect a check for failure here; how does ocaml handle it? Exceptions?
- mercurial 12y agoYes.
- talex5 12y agoYou're right. OCaml will throw an exception here. Many of the functions in the standard library throw exceptions when it would be better to return an option type (newer libraries are usually better). The exception will be caught and logged in the "callback" function below. It then rethrows it, but the unikernel will continue serving requests.