X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2FDEVEL%2Focaml-http%2Fhttp_misc.ml;fp=helm%2Fsoftware%2FDEVEL%2Focaml-http%2Fhttp_misc.ml;h=daa81f3b7085d342f94d53e7a45a63eabce224f0;hb=8dfaf82df32a4031f06127125e3b780763604982;hp=abe6702c2a0aedb11541ffd09b672248a633083f;hpb=a5ae1f9778ff863f7124454008426d5bf7c0fd71;p=helm.git diff --git a/helm/software/DEVEL/ocaml-http/http_misc.ml b/helm/software/DEVEL/ocaml-http/http_misc.ml index abe6702c2..daa81f3b7 100644 --- a/helm/software/DEVEL/ocaml-http/http_misc.ml +++ b/helm/software/DEVEL/ocaml-http/http_misc.ml @@ -144,3 +144,11 @@ let list_assoc_all key pairs = let warn msg = prerr_endline (sprintf "ocaml-http WARNING: %s" msg) let error msg = prerr_endline (sprintf "ocaml-http ERROR: %s" msg) +let finally at_end f arg = + let res = + try f arg + with exn -> at_end (); raise exn + in + at_end (); + res +