Module Printexc.Slot
- since
- 4.02.0
type t= backtrace_slot
val is_raise : t -> boolis_raise slotistruewhenslotrefers to a raising point in the code, andfalsewhen it comes from a simple function call.- since
- 4.02
val is_inline : t -> boolis_inline slotistruewhenslotrefers to a call that got inlined by the compiler, andfalsewhen it comes from any other context.- since
- 4.04.0
val location : t -> location optionlocation slotreturns the location information of the slot, if available, andNoneotherwise.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)
- since
- 4.02
val format : int -> t -> string optionformat 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.Whole-backtrace printing functions also skip some uninformative slots; in that case,
format pos slotreturnsNone.- since
- 4.02