1Printexc.Slot(3) OCamldoc 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 format : int -> t -> string option
70
71
72 format pos slot returns the string representation of slot as raw_back‐
73 trace_to_string would format it, assuming it is the pos -th element of
74 the backtrace: the 0 -th element is pretty-printed differently than the
75 others.
76
77 Whole-backtrace printing functions also skip some uninformative slots;
78 in that case, format pos slot returns None .
79
80
81 Since 4.02
82
83
84
85
86
872018-04-14 source: Printexc.Slot(3)