Printexc.Slot(3)
π NAME π
Printexc.Slot β no description. Like bestie, the manpage literally says no description π. This one is coming at you from the OCaml library β¨.
π§ Module π§
Module Printexc.Slot π
β¨ Documentation β¨
πΈ Module Slot πΈ
: sig end
Since 4.02 π«Ά
type t = Printexc.backtrace_slot
Okay so here's the whole vibe of Module Slot:
val is_raise : t -> boolβis_raise slotistruewhenslotrefers to a raising point in the code, andfalsewhen it comes from a simple function call. Since 4.02 π₯val is_inline : t -> boolβis_inline slotistruewhenslotrefers to a call that got inlined by the compiler, andfalsewhen it comes from any other context. Since 4.04 πval location : t -> Printexc.location optionβlocation slothands you the location information of the slot, if available, andNoneotherwise. Since 4.02 πΈ
Some possible reasons for failing to return a location are as follow:
-the slot corresponds to a compiler-inserted raise
-the slot corresponds to a part of the program that has not been compiled with debug information ( -g )
val name : t -> string optionβname slotreturns the name of the function or definition enclosing the location referred to by the slot.name slotreturnsNoneif the name is unavailable, which may happen for the same reasons aslocationreturningNone. Since 4.11 πval format : int -> t -> string optionβformat pos slotreturns the string representation ofslotasraw_backtrace_to_stringwould format it, assuming it is thepos-th element of the backtrace: the0-th element is pretty-printed differently than the others. Since 4.02 π
Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None . π
xoxo, OCamldoc π β source/version-and-date moment: 2026-06-22, page Printexc.Slot(3) ππ¦
π¦ where this page comes from
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms