upstream: github.com/mirleft/ocaml-tls
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(E105): replace catch-all exception handlers with specific exceptions

- Parsing functions (int_of_string, float_of_string, Int64.of_string):
catch Failure _ instead of _
- TLS inhibit/try_write_t: use _exn to name the caught exception
- sql open_or_create: catch Failure _ | Eio.Io _
- run_tests json_equal: catch Failure _ | Invalid_argument _

+3 -2
+2 -1
eio/tls_eio.ml
··· 55 55 raise exn 56 56 57 57 let try_write_t t cs = 58 - try write_t t cs with _ -> Eio.Fiber.check () (* Error is in [t.state] *) 58 + try write_t t cs 59 + with _exn -> Eio.Fiber.check () (* Error is in [t.state] *) 59 60 60 61 let rec read_react t = 61 62 let handle tls buf =
+1 -1
unix/tls_unix.ml
··· 57 57 58 58 let tls_alert a = Tls_alert a 59 59 let tls_fail f = Tls_failure f 60 - let inhibit fn v = try fn v with _ -> () 60 + let inhibit fn v = try fn v with _exn -> () 61 61 62 62 let rec unix_write fd str off len = 63 63 let written = Unix.write_substring fd str off len in