1Printexc.Slot(3) OCaml library Printexc.Slot(3)
2
3
4
6 Printexc.Slot - no description
7
9 Module Printexc.Slot
10
12 Module Slot
13 : sig end
14
15
16 Since 4.02.0
17
18
19
20
21
22 type t = Printexc.backtrace_slot
23
24
25
26
27
28 val is_raise : t -> bool
29
30
31 is_raise slot is true when slot refers to a raising point in the code,
32 and false when it comes from a simple function call.
33
34
35 Since 4.02
36
37
38
39 val is_inline : t -> bool
40
41
42 is_inline slot is true when slot refers to a call that got inlined by
43 the compiler, and false when it comes from any other context.
44
45
46 Since 4.04.0
47
48
49
50 val location : t -> Printexc.location option
51
52
53 location slot returns the location information of the slot, if avail‐
54 able, and None otherwise.
55
56 Some possible reasons for failing to return a location are as follow:
57
58 -the slot corresponds to a compiler-inserted raise
59
60 -the slot corresponds to a part of the program that has not been com‐
61 piled with debug information ( -g )
62
63
64
65 Since 4.02
66
67
68
69 val name : t -> string option
70
71
72 name slot returns the name of the function or definition enclosing the
73 location referred to by the slot.
74
75
76 name slot returns None if the name is unavailable, which may happen for
77 the same reasons as location returning None.
78
79
80 Since 4.11
81
82
83
84 val format : int -> t -> string option
85
86
87 format pos slot returns the string representation of slot as raw_back‐
88 trace_to_string would format it, assuming it is the pos -th element of
89 the backtrace: the 0 -th element is pretty-printed differently than the
90 others.
91
92 Whole-backtrace printing functions also skip some uninformative slots;
93 in that case, format pos slot returns None .
94
95
96 Since 4.02
97
98
99
100
101
102OCamldoc 2020-09-01 Printexc.Slot(3)