{"action":"opened","issue":{"url":"https://api.github.com/repos/mirage/ocaml-dns/issues/37","labels_url":"https://api.github.com/repos/mirage/ocaml-dns/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/mirage/ocaml-dns/issues/37/comments","events_url":"https://api.github.com/repos/mirage/ocaml-dns/issues/37/events","html_url":"https://github.com/mirage/ocaml-dns/issues/37","id":55516726,"number":37,"title":"Stop gobbling exceptions in the serialization","user":{"login":"avsm","id":53164,"avatar_url":"https://avatars.githubusercontent.com/u/53164?v=3","gravatar_id":"","url":"https://api.github.com/users/avsm","html_url":"https://github.com/avsm","followers_url":"https://api.github.com/users/avsm/followers","following_url":"https://api.github.com/users/avsm/following{/other_user}","gists_url":"https://api.github.com/users/avsm/gists{/gist_id}","starred_url":"https://api.github.com/users/avsm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avsm/subscriptions","organizations_url":"https://api.github.com/users/avsm/orgs","repos_url":"https://api.github.com/users/avsm/repos","events_url":"https://api.github.com/users/avsm/events{/privacy}","received_events_url":"https://api.github.com/users/avsm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-26T18:12:05Z","updated_at":"2015-01-26T18:12:05Z","closed_at":null,"body":"Related to #36; in lib/protocol.ml we have:\r\n\r\n```\r\nlet contain_exc l v =\r\n  try\r\n    Some (v ())\r\n  with exn ->\r\n    Printexc.print_backtrace stderr;\r\n    Printf.eprintf \"dns %s exn: %s\\n%!\" l (Printexc.to_string exn);\r\n    None\r\n```\r\n\r\nThis prints the exception to stderr (which is bad, see #36), and then returns a blank option with no hint about the error.  It does make more sense to raise the exception here or use an `Or_error.t` style polymorphic return.  This would change the `Protocol.Server` types though, so I'm deferring this for the moment while fixing some of the easier ones in #36."}}