package lsp
LSP protocol implementation in OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
jsonrpc-1.4.1.tbz
sha256=cee8371e7048e24c90e916c373ef6f3aba6f474d8a5fcf507ab6650fd8575eeb
sha512=150ebf71d3484d3beec1a145877cf30d84581bd072dd20159e878ed07cc4fc647b019b98bb0c9fede839b87f7bd13de4a64b534c0760a2ec57d0e4a4deac6f0f
doc/src/lsp.stdune/exn.ml.html
Source file exn.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
# 1 "exn.cppo.ml" module List = Stdlib.ListLabels module String = Stdlib.StringLabels type t = exn external raise : exn -> _ = "%raise" external raise_notrace : exn -> _ = "%raise_notrace" external reraise : exn -> _ = "%reraise" let protectx x ~f ~finally = match f x with | y -> finally x; y | exception e -> finally x; raise e let protect ~f ~finally = protectx () ~f ~finally let pp_uncaught ~backtrace fmt exn = let s = Printf.sprintf "%s\n%s" (Printexc.to_string exn) backtrace |> String_split.split_lines |> ListLabels.map ~f:(Printf.sprintf "| %s") |> String.concat ~sep:"\n" in let line = String.make 71 '-' in Format.fprintf fmt "/%s\n| @{<error>Internal error@}: Uncaught exception.\n%s\n\\%s@." line s line let pp fmt exn = Format.pp_print_string fmt (Printexc.to_string exn) (* 4.06 support for Stdune/exn.ml On linux, raise_with_backtrace threw `Error: junk `raise_with_backtrace (%rip)' after expression` We support 4.06 by rely on reraise on 4.06 Possibly related: https://github.com/ocaml/ocaml/pull/1557 https://github.com/ocaml/ocaml/pull/1465 https://github.com/ocaml/ocaml/pull/378 https://github.com/ocaml/ocaml/issues/7666 *) # 50 "exn.cppo.ml" let raise_with_backtrace = Printexc.raise_with_backtrace # 55 "exn.cppo.ml" let equal = ( = ) let hash = Stdlib.Hashtbl.hash let to_dyn exn = Dyn.String (Printexc.to_string exn)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>