Caml1999I037 &0Stdlib__Printexc!th;@@@A#exnG@@@@@@@,printexc.mliRR@@@@@@A@)to_stringi@@@@&stringQ@@@@@@UU@@'A@@1to_string_defaultj@'@@@@@@@@@)Y22*Y2V@@:B@@%printk@@!a@!b@@@@ @@@@@@_A_@@QC@@%catchl@@!a@!b@@@@ @@@@@WgYYXh{@0ocaml.deprecated^h{~_h{@ "This function is no longer needed.jh{kh{@@mh{nh{@@@@@@qh{{@@D@@/print_backtracem@&Stdlib+out_channel@@@$unitF@@@@@@r  r  @@E@@-get_backtracen@@@@@@@@@@A  A  0@@F@@0record_backtraceo@$boolE@@@*@@@@@@H  H  %@@G@@0backtrace_statusp@9@@@@@@@@@P77P7Y@@H@@0register_printerq@@@@@&optionL@@@@@@@@]@@@@@@VV@@I@@,use_printersr@@@@@@@@@@@@@ii@@ J@@-raw_backtraces;@@@A@@@@@q~~q~@@@@K@A@3raw_backtrace_entryt;@@@@#intA@@@@@@@@@A@(L@A@5raw_backtrace_entriesu@#@@@%arrayJ#@@@@@@@@@12@@BM@@1get_raw_backtracev@@@@@@@@@@CD@@TN@@3print_raw_backtracew@+out_channel@@@@3@@@@@@@@@@@\],@@mO@@7raw_backtrace_to_stringx@E@@@Z@@@@@@no@@P@@4raise_with_backtracey@@@@@]@@@!a@@@@@ǐ5%raise_with_backtraceBA @@@@>>x@@Q@@-get_callstackz@@@@y@@@@@ʐ:caml_get_current_callstackAA@@@$$$o@@R@@ "default_uncaught_exception_handler{@@@@@@@@3@@@@@@@@@@S@@>set_uncaught_exception_handler|@@@@@@@@@M@@@@@@@Q@@@@@@@@T@@.backtrace_slot};@@@A@@@@@#W#W#W#j@@@@U@A@/backtrace_slots~@@@@Π@@@@@@@@@@@@###$@@V@@@A@&stringQ;@@ A@@@@@B@@@%bytesC;@@ A@@@@@F@@@%floatD;@@A@@@@@J@@@$boolE;@@%falsec@@T@$trued@@Z@@@A@@@@@[@A@$unitF;@@"()e@@e@@@A@@@@@f@A@ #exnG;@@@A@@@@@j@@@#effH;@@O@A@A@@@@@@s@@@,continuationI;@@Q@@P@B@A@nY@@@@@@@@@%arrayJ;@@R@A@A@@@@@@@@@ $listK;@@S@A"[]f@@@"::g@@@T@@@ @@A@Y@@@@@@@@&optionL;@@V@A$Noneh@@@$Somei@@@@@A@Y@@@@@@@@)nativeintM;@@A@@@@@@@@%int32N;@@A@@@@@@@@%int64O;@@A@@@@@@@@&lazy_tP;@@X@AJA@Y@@@@@@@@5extension_constructorR;@@A@@@@@@@@*floatarrayS;@@A@@@@@@@@&iarrayT;@@Y@A[A@Y@@@@@@@@*atomic_locU;@@Z@AdA@@@@@@@@@.Assert_failure`#@@@@@J@@@@@@@@[@@A=ocaml.warn_on_literal_pattern @ @0Division_by_zero]#@@@A  @+End_of_file\#$@@@A@'FailureY#,@'@@A!$$@0Invalid_argumentX#5@0@@A*$-#-@-Match_failureV#>@@=@9@;@@a@@A;5>4>@)Not_foundZ#O@@@AC=F<F@-Out_of_memoryW#W@@@AKENDN@.Stack_overflow^#_@@@ASMVLV@.Sys_blocked_io_#g@@@A[U^T^@)Sys_error[#o@j@@Ad^g]g@:Undefined_recursive_modulea#x@@w@s@u@@h@@Auoxnx@:Continuation_already_takenb#@@@A}wv@&Stdlib@AxA+!tARR@@;@@@A-@@@@@@@RR@)ocaml.doc? The type of exception values. SS@@@@@@@@@@@@AAг#exnRR@@!3@+;@@@A3@@@@@@@@(%@@@A @@)&%$@$$@@@$@$@@43@)to_stringUU@б@гr#exnUU@@ @@@3@[U@A@@г&stringUU@@ @@@@@@@@@@@U @` Q [Printexc.to_string e] returns a string representation of the exception [e]. VW0@@@@@@@A@@@p @@@@@@11to_string_defaultY26Y2G@б@г#exnY2IY2L@@ @@@3@J_8@A@@г&string(Y2P)Y2V@@ @@@@@@@@@@@3Y22 @ [Printexc.to_string_default e] returns a string representation of the exception [e], ignoring all registered exception printers. @since 4.09 @ZWWA]@@@@@@@YB@@@T@@@@@@1%printW_X_@б@б@А!a@B@3baabbbbb@H]6@Ah_i_@@А!b@B@ s_t_@@@ @@@@б@А!a~_ _@@А!b__@@@(@@# @@@@@&_@@@_ @ < [Printexc.print fn x] applies [fn] to [x] and returns the result. If the evaluation of [fn x] raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application. `e3W@@@@@@@C@@@@@@@@@F%catchgY]gYb@б@б@А!a@B@3@]p6@AgYegYg@@А!b@B@ gYkgYm@@@ @@@@б@А!agYrgYt@@А!bgYxgYz@@@(@@# @@@@@&gYd@@@gYYh{@0ocaml.deprecatedh{~h{@ "This function is no longer needed.h{h{@@h{h{@@@@@@h{{@{  [Printexc.catch fn x] is similar to {!Printexc.print}, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as [Printexc.catch] does. Moreover, calling [Printexc.catch] makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use [Printexc.catch] in new code. ip a @@@@@@@+D@@+*@)(%$@!@@@@1@@@@@@kB/print_backtrace4r  5r  @б@г+out_channel?r  @r  @@ @@@3A@@AAAAA@]@A@@г$unitNr  Or  @@ @@@@@@@@@@@Yr   @ϐ I [Printexc.print_backtrace oc] prints an exception backtrace on the output channel [oc]. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls. If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one. @since 3.11 fs  g  @@@@@@@E@@@z@@@@@@1-get_backtrace}A  ~A  @б@г5$unitA  "A  &@@ @@@3@J_8@A@@гa&stringA  *A  0@@ @@@@@@@@@@@A   @ [Printexc.get_backtrace ()] returns a string containing the same exception backtrace that [Printexc.print_backtrace] would print. Same restriction usage than {!print_backtrace}. @since 3.11 B 1 1F  @@@@@@@F@@@(Ð@@@@@@10record_backtraceH  H  @б@г$boolH  H  @@ @@@3@J_8@A@@г$unitH  !H  %@@ @@@@@@@@@@@H   @a  [Printexc.record_backtrace b] turns recording of exception backtraces on (if [b = true]) or off (if [b = false]). Initially, backtraces are not recorded, unless the [b] flag is given to the program through the [OCAMLRUNPARAM] variable. @since 3.11 I & &N35@@@@@@@G@@@q @@@@@@10backtrace_statusP7;P7K@б@гǠ$unitP7MP7Q@@ @@@3@J_8@A@@г砐$bool)P7U*P7Y@@ @@@@@@@@@@@4P77 @ [Printexc.backtrace_status()] returns [true] if exception backtraces are currently recorded, [false] if not. @since 3.11 AQZZBT@@@@@@@ZH@@@U@@@@@@10register_printerXVYV@б@б@г#exneVfV@@ @@@3gffggggg@La:@A@@гӠ&optiontVuV@гH&string~VV@@ @@@@@@@@@ @@@$@@!'@@г@$unitVV@@ @@@.@@@@@1V @@@V @ ~ [Printexc.register_printer fn] registers [fn] as an exception printer. The printer should return [None] or raise an exception if it does not know how to convert the passed exception, and [Some s] with [s] the resulting string if it can convert the passed exception. Exceptions raised by the printer are ignored. When converting an exception into a string, the printers will be invoked in the reverse order of their registrations, until a printer returns a [Some s] value (if no such printer exists, the runtime will use a generic printer). When using this mechanism, one should be aware that an exception backtrace is attached to the thread that saw it raised, rather than to the exception itself. Practically, it means that the code related to [fn] should not use the backtrace if it has itself raised an exception before. @since 3.11.2 Wg@@@@@@@I@@@%@@@@@@Q,use_printersii@б@гp#exnii@@ @@@3@j8@A@@г<&optionii@г&stringii@@ @@@@@@@@@ @@@$@@!'@@@i@m [Printexc.use_printers e] returns [None] if there are no registered printers and [Some s] with [s] the resulting string otherwise. @since 4.09 jm_a@@@@@@@J@@*@}@@@@@@@&%4 {1 Raw backtraces} "occ#oc|@@@@@@3!  !!!!!@Rg1@AA+-raw_backtraceB/q~0q~@@;@@@A@@@@@4q~~@ C The type [raw_backtrace] stores a backtrace in a low-level format, which can be converted to usable form using [raw_backtrace_entries] and [backtrace_slots_of_raw_entry] below. Converting backtraces to [backtrace_slot]s is slower than capturing the backtraces. If an application processes many backtraces, it can be useful to use [raw_backtrace] to avoid or delay conversion. Raw backtraces cannot be marshalled. If you need marshalling, you should use the array returned by the [backtrace_slots] function of the next section. @since 4.01 ArB@@@@@@@@@ZK@@@A@T@@@@@@@+ @A+3raw_backtrace_entryCYZ@@;@@*@7@@@@@@@bc@ِ  A [raw_backtrace_entry] is an element of a [raw_backtrace]. Each [raw_backtrace_entry] is an opaque integer, whose value is not stable between different programs, or even between different runs of the same binary. A [raw_backtrace_entry] can be converted to a usable form using [backtrace_slots_of_raw_entry] below. Note that, due to inlining, a single [raw_backtrace_entry] may convert to several [backtrace_slot]s. Since the values of a [raw_backtrace_entry] are not stable, they cannot be marshalled. If they are to be converted, the conversion must be done by the process that generated them. Again due to inlining, there may be multiple distinct raw_backtrace_entry values that convert to equal [backtrace_slot]s. However, if two [raw_backtrace_entry]s are equal as integers, then they represent the same [backtrace_slot]s. @since 4.12 pq{@@@@@@@A@L@@@@г#intz@@3xwwxxxxx@YSM);@@@@1@@@@@@@@&#@@@A%@@'%$@$$@@@$@$@@3@@A32@5raw_backtrace_entries@б@гy-raw_backtrace@@ @@@3@2ZT@A@@г=%array@гh3raw_backtrace_entry@@ @@@@@@@@@ @@@$@@!'@@@@G- @since 4.12 @@@@@@@M@@*@W򐠠@@@@@@@1get_raw_backtrace @б@г$unit@@ @@@3@Yn8@A@@гࠐ-raw_backtrace @@ @@@@@@@@@@@ @ [Printexc.get_raw_backtrace ()] returns the same exception backtrace that [Printexc.print_backtrace] would print, but in a raw format. Same restriction usage than {!print_backtrace}. @since 4.01 '(@@@@@@@@N@@@;@@@@@@13print_raw_backtrace!>?@б@г+out_channelIJ@@ @@@3KJJKKKKK@J_8@A@@б@г+-raw_backtraceZ[$@@ @@@@@г$unitg(h,@@ @@@@@@@@!@@@'@@$* @@@u@될 ` Print a raw backtrace in the same format [Printexc.print_backtrace] uses. @since 4.01 --@@@@@@@O@@@@@@@@@C7raw_backtrace_to_string"@б@гu-raw_backtrace@@ @@@3@\q8@A@@г}&string@@ @@@@@@@@@@@ @4 n Return a string from a raw backtrace, in the same format [Printexc.get_backtrace] uses. @since 4.01 :<@@@@@@@P@@@Dߐ@@@@@@14raise_with_backtrace#>G>[@б@г#exn>]>`@@ @@@3@J_8@A@@б@гϠ-raw_backtrace>d>q@@ @@@@@А!a@D@ >u>w@@@ @@@@@%@@"(@@5%raise_with_backtraceBA @@@@>>x@ j Reraise the exception using the given raw_backtrace for the origin of the exception @since 4.05 +,@@@@@@@DQ@@@@@@@@@@INM8 {1 Current call stack} JK"@@@@@@3IHHIIIII@[p9@A-get_callstack$V$-W$:@б@г4#inta$<b$?@@ @@@@@г?-raw_backtracen$Co$P@@ @@@'@@@@@*@@:caml_get_current_callstackAAb@@@}$$~$o@ & [Printexc.get_callstack n] returns a description of the top of the call stack on the current program point (for the current thread), with at most [n] entries. (Note: this function is not related to exceptions at all, despite being part of the [Printexc] module.) @since 4.01 pp@@@@@@@R@@@@@@@@@O9 {1 Uncaught exceptions} @@@@@@3@a\7@A "default_uncaught_exception_handler%@б@гc#exn@@ @@@@@б@г-raw_backtrace@@ @@@)@@г$unit@@ @@@6@@@@@9@@@%@@<( @@@@a [Printexc.default_uncaught_exception_handler] prints the exception and backtrace on standard error output. @since 4.11 @@@@@@@S@@@q @@@@@@[>set_uncaught_exception_handler&@б@б@г#exn@@ @@@3@vq:@A@@б@г-raw_backtrace-.@@ @@@@@г砐$unit:;@@ @@@@@@@@!@@@'@@$* @@г$unitMN@@ @@@1@@@@@4V @@@Y @ϐ  [Printexc.set_uncaught_exception_handler fn] registers [fn] as the handler for uncaught exceptions. The default handler is {!Printexc.default_uncaught_exception_handler}. Note that when [fn] is called all the functions registered with {!Stdlib.at_exit} have already been called. Because of this you must make sure any output channel [fn] writes on is flushed. Also note that exceptions raised by user code in the interactive toplevel are not passed to this function as they are caught by the toplevel itself. If [fn] raises an exception, both the exceptions passed to [fn] and raised by [fn] will be printed with their respective backtrace. @since 4.02 fg""@@@@@@@T@@@z@@@@@@T {1 Manipulation of backtrace information} These functions are used to traverse the slots of a raw backtrace and extract information from them in a programmer-friendly format. ""#S#U@@@@@@3@f}1@AA+.backtrace_slot'D#W#\#W#j@@;@@bA@@@@@#W#W@ b The abstract type [backtrace_slot] represents a single slot of a backtrace. @since 4.02 #k#k##@@@@@@@@@U@@@A@@@@@@@@*@/backtrace_slots(####@б@г-raw_backtrace####@@ @@@ 3@D>8@A@@г2&option#$#$@гc%array#$ #$@гV.backtrace_slot###$ @@ @@@ #@@@@@@ ( @@@&@@@-#@@@3@@06&@@@##)@r " Returns the slots of a raw backtrace, or [None] if none of them contain useful information. In the return array, the slot at index [0] corresponds to the most recent function call, raise, or primitive [get_backtrace] call in the trace. Some possible reasons for returning [None] are as follow: - none of the slots in the trace come from modules compiled with debug information ([-g]) - the program is a bytecode program that has not been linked with debug information enabled ([ocamlc -g]) @since 4.02  $$ &<&>@@@@@@@ "V@@9@ @@@@@@O@@# T (/(9@@@Ш@г#int ] (/(< ^ (/(?@@M@@@@$P@ r@@@@@@# q(S(\@@@Ш@г#int z(S(_ {(S(b@@j@@@@'m@ @@@@@@@A@ @@@@@@@3        @@A@$Slot7F )n)u )n)y@ e@@БA+!t1G )) ))@@;@@A*@@@;@@@@ )) ))@@@@ _@@@Aг .backtrace_slot )) @@3        @C=;@@@A#@@@@@:@@@@@@@@A@@@@3        @ @A@(is_raise2 )) ))@б@г6!t )) ))@@ @@@B3        @'A;@A@@г $bool )) ))@@ @@@C@@@@@D@@@ )) @ v [is_raise slot] is [true] when [slot] refers to a raising point in the code, and [false] when it comes from a simple function call. @since 4.02  )) !*_*c@@@@@@@ &`@@@  !@@@@@@1)is_inline3 $#*e*k %#*e*t@б@г!t /#*e*w 0#*e*x@@ @@@E3 1 0 0 1 1 1 1 1@J_8@A@@г $bool >#*e*| ?#*e*@@ @@@F@@@@@G@@@ I#*e*g @ [is_inline slot] is [true] when [slot] refers to a call that got inlined by the compiler, and [false] when it comes from any other context. @since 4.04  V$** W)+2+6@@@@@@@ oa@@@  j@@@@@@1(location4 m++8+> n++8+F@б@гȠ!t x++8+I y++8+J@@ @@@H3 z y y z z z z z@J_8@A@@г 栐&option ++8+W ++8+]@г (location ++8+N ++8+V@@ @@@I@@@@@@K @@@$@@L!'@@@ ++8+:@  z [location slot] returns the location information of the slot, if available, and [None] otherwise. 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  ,+^+` 5,,@@@@@@@ b@@*@ ' @@@@@@@$name5 7,, 7,,@б@г !t 7,, 7,,@@ @@@M3        @Yn8@A@@г >&option 7,, 7,-@г &string 7,, 7,,@@ @@@N@@@@@@P @@@$@@Q!'@@@ 7,,@ o  [name slot] returns the name of the function or definition enclosing the location referred to by the slot. [name slot] returns None if the name is unavailable, which may happen for the same reasons as [location] returning None. @since 4.11  8-- ?..@@@@@@@ c@@*@  @@@@@@@&format6 A.. A..#@б@г #int (A..& )A..)@@ @@@R3 * ) ) * * * * *@Yn8@A@@б@г!t 9A..- :A...@@ @@@S@@г &option FA..9 GA..?@г &string PA..2 QA..8@@ @@@T(@@@@@@V- @@@"@@W0%@@@6@@X39@@@ cA..@ ِ  [format pos slot] returns the string representation of [slot] as [raw_backtrace_to_string] would format it, assuming it is the [pos]-th element of the backtrace: the [0]-th element is pretty-printed differently than the others. Whole-backtrace printing functions also skip some uninformative slots; in that case, [format pos slot] returns [None]. @since 4.02  pB.@.B qK//@@@@@@@ d@@-@  @@@@@@R@A@@e>@@@r*@@3        @_t,@A3        @@A )n)| L//@@  - @since 4.02  )[)[ )[)m@@@@@@@ )n)n@@  9 {1 Raw backtrace slots}  O// O//@@@@@@3        @@ A@@x@X"@@d@@ :21@11@@@1@1@.,@AA+2raw_backtrace_slot8H Q/0 Q/0@@;@@A@@@@@ Q//@ R  This type is used to iterate over the slots of a [raw_backtrace]. For most purposes, [backtrace_slots_of_raw_entry] is easier to use. Like [raw_backtrace_entry], values of this type are process-specific and must absolutely not be marshalled, and are unsafe to use for this reason (marshalling them may not fail, but un-marshalling and using the result will result in undefined behavior). Elements of this type can still be compared and hashed: when two elements are equal, then they represent the same source location (the converse is not necessarily true in presence of inlining, for example). @since 4.02  R00 _22@@@@@@@@@ f@@@A@ a @@@@@@@B@4raw_backtrace_length9 a22 a22@б@гܠ-raw_backtrace a22 a22@@ @@@Y3        @\>8@A@@г #int a22 a22@@ @@@Z@@@@@[@@@ %a22 @ g [raw_backtrace_length bckt] returns the number of slots in the backtrace [bckt]. @since 4.02  2b22 3f3>3@@@@@@@@ Kg@@@  F@@@@@@16get_raw_backtrace_slot: Ih3B3F Jh3B3\@б@г%-raw_backtrace Th3B3_ Uh3B3l@@ @@@\3 V U U V V V V V@J_8@A@@б@г 8#int eh3B3p fh3B3s@@ @@@]@@г2raw_backtrace_slot rh3B3w sh3B3@@ @@@^@@@@@_!@@@'@@`$* @@@ h3B3B@ t [get_raw_backtrace_slot bckt pos] returns the slot in position [pos] in the backtrace [bckt]. @since 4.02  i33 m44@@@@@@@ h@@@  @@@@@@C:convert_raw_backtrace_slot; o44  o44#@б@гנ2raw_backtrace_slot o44& o448@@ @@@a3        @\q8@A@@г-.backtrace_slot o44< o44J@@ @@@b@@@@@c@@@ o44 @ ? i Extracts the user-friendly [backtrace_slot] from a low-level [raw_backtrace_slot]. @since 4.02  p4K4K t44@@@@@@@ i@@@ O ꐠ@@@@@@1;get_raw_backtrace_next_slot< w44 w44@б@г 2raw_backtrace_slot x44 x44@@ @@@d3        @J_8@A@@г f&optionx45 x45@г92raw_backtrace_slotx44x45 @@ @@@e@@@@@@g @@@$@@h!'@@@!w44@ g [get_raw_backtrace_next_slot slot] returns the next slot inlined, if any. Sample code to iterate over all frames (inlined and non-inlined): {[ (* Iterate over inlined frames *) let rec iter_raw_backtrace_slot f slot = f slot; match get_raw_backtrace_next_slot slot with | None -> () | Some slot' -> iter_raw_backtrace_slot f slot' (* Iterate over stack frames *) let iter_raw_backtrace f bt = for i = 0 to raw_backtrace_length bt - 1 do iter_raw_backtrace_slot f (get_raw_backtrace_slot bt i) done ]} @since 4.04 .y55/7|7~@@@@@@@Gj@@*@ B@@@@@@@PO5 {1 Exception slots} L77M77@@@@@@3KJJKKKKK@Rg1@A+exn_slot_id=X77Y77@б@г#exnc77d77@@ @@@i@@гC#intp77q77@@ @@@j'@@@@@k*@@@{77 @ 񐠠 [Printexc.exn_slot_id] returns an integer which uniquely identifies the constructor used to create the exception value [exn] (in the current runtime). @since 4.02 778l8n@@@@@@@k@@@ @@@@@@I-exn_slot_name>8p8t8p8@б@гL#exn8p88p8@@ @@@l3@b]8@A@@г&string8p88p8@@ @@@m@@@@@n@@@8p8p @ : [Printexc.exn_slot_name exn] returns the internal name of the constructor used to create the exception value [exn]. @since 4.02 8899 @@@@@@@l@@@ J吠@@@@@@1򐠠"/*9"9"9"9)@@@@@@3@CX1@A k {1 Obj printer} Unsafe printer used in this module and exposed to the other standard library module 9+9+99@@@@@@?string_of_extension_constructorg 99 99@б@г #Obj!t9999@ 99 99@@@@@@/4 @@г&string-99.99@@ @@@0A@@@@@1D@@@899 @@Pm@@ @@J@  A@ ~ W@ 7 @  @  \@  @  @  b@ B @  @  \@ ( "A@  A@  @ h A@ !@@J@@z@Z@A@o@O @A@@@@A@xQ@1@@[@(@@xJ@@3}||}}}}}@zL@A@ H************************************************************************A@@A@L@ H BMMBM@ H OCaml CC@ H DD3@ H Xavier Leroy, projet Cristal, INRIA Rocquencourt E44E4@ H FF@ H Copyright 1996 Institut National de Recherche en Informatique et GG@ H en Automatique. HHg@ H IhhIh@ H All rights reserved. This file is distributed under the terms of JJ@ H the GNU Lesser General Public License version 2.1, with the KKN@ H special exception on linking described in the file LICENSE. LOOLO@ H MM@ H************************************************************************NN5@ H* Facilities for printing exceptions and inspecting current call stack. ڠ * The type of exception values. D R* [Printexc.to_string e] returns a string representation of the exception [e].  頠 * [Printexc.to_string_default e] returns a string representation of the exception [e], ignoring all registered exception printers. @since 4.09  =* [Printexc.print fn x] applies [fn] to [x] and returns the result. If the evaluation of [fn x] raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.  J * [Printexc.catch fn x] is similar to {!Printexc.print}, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as [Printexc.catch] does. Moreover, calling [Printexc.catch] makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use [Printexc.catch] in new code.  נ J* [Printexc.print_backtrace oc] prints an exception backtrace on the output channel [oc]. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls. If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one. @since 3.11  * [Printexc.get_backtrace ()] returns a string containing the same exception backtrace that [Printexc.print_backtrace] would print. Same restriction usage than {!print_backtrace}. @since 3.11  @  * [Printexc.record_backtrace b] turns recording of exception backtraces on (if [b = true]) or off (if [b = false]). Initially, backtraces are not recorded, unless the [b] flag is given to the program through the [OCAMLRUNPARAM] variable. @since 3.11  * [Printexc.backtrace_status()] returns [true] if exception backtraces are currently recorded, [false] if not. @since 3.11  * [Printexc.register_printer fn] registers [fn] as an exception printer. The printer should return [None] or raise an exception if it does not know how to convert the passed exception, and [Some s] with [s] the resulting string if it can convert the passed exception. Exceptions raised by the printer are ignored. When converting an exception into a string, the printers will be invoked in the reverse order of their registrations, until a printer returns a [Some s] value (if no such printer exists, the runtime will use a generic printer). When using this mechanism, one should be aware that an exception backtrace is attached to the thread that saw it raised, rather than to the exception itself. Practically, it means that the code related to [fn] should not use the backtrace if it has itself raised an exception before. @since 3.11.2  L * [Printexc.use_printers e] returns [None] if there are no registered printers and [Some s] with [s] the resulting string otherwise. @since 4.09  5* {1 Raw backtraces}  ܠ D* The type [raw_backtrace] stores a backtrace in a low-level format, which can be converted to usable form using [raw_backtrace_entries] and [backtrace_slots_of_raw_entry] below. Converting backtraces to [backtrace_slot]s is slower than capturing the backtraces. If an application processes many backtraces, it can be useful to use [raw_backtrace] to avoid or delay conversion. Raw backtraces cannot be marshalled. If you need marshalling, you should use the array returned by the [backtrace_slots] function of the next section. @since 4.01  * A [raw_backtrace_entry] is an element of a [raw_backtrace]. Each [raw_backtrace_entry] is an opaque integer, whose value is not stable between different programs, or even between different runs of the same binary. A [raw_backtrace_entry] can be converted to a usable form using [backtrace_slots_of_raw_entry] below. Note that, due to inlining, a single [raw_backtrace_entry] may convert to several [backtrace_slot]s. Since the values of a [raw_backtrace_entry] are not stable, they cannot be marshalled. If they are to be converted, the conversion must be done by the process that generated them. Again due to inlining, there may be multiple distinct raw_backtrace_entry values that convert to equal [backtrace_slot]s. However, if two [raw_backtrace_entry]s are equal as integers, then they represent the same [backtrace_slot]s. @since 4.12  .* @since 4.12  ) * [Printexc.get_raw_backtrace ()] returns the same exception backtrace that [Printexc.print_backtrace] would print, but in a raw format. Same restriction usage than {!print_backtrace}. @since 4.01  㠠 a* Print a raw backtrace in the same format [Printexc.print_backtrace] uses. @since 4.01  o* Return a string from a raw backtrace, in the same format [Printexc.get_backtrace] uses. @since 4.01  E k* Reraise the exception using the given raw_backtrace for the origin of the exception @since 4.05 蠠9* {1 Current call stack} ̠ '* [Printexc.get_callstack n] returns a description of the top of the call stack on the current program point (for the current thread), with at most [n] entries. (Note: this function is not related to exceptions at all, despite being part of the [Printexc] module.) @since 4.01 :* {1 Uncaught exceptions} r * [Printexc.default_uncaught_exception_handler] prints the exception and backtrace on standard error output. @since 4.11 ' * [Printexc.set_uncaught_exception_handler fn] registers [fn] as the handler for uncaught exceptions. The default handler is {!Printexc.default_uncaught_exception_handler}. Note that when [fn] is called all the functions registered with {!Stdlib.at_exit} have already been called. Because of this you must make sure any output channel [fn] writes on is flushed. Also note that exceptions raised by user code in the interactive toplevel are not passed to this function as they are caught by the toplevel itself. If [fn] raises an exception, both the exceptions passed to [fn] and raised by [fn] will be printed with their respective backtrace. @since 4.02  * {1 Manipulation of backtrace information} These functions are used to traverse the slots of a raw backtrace and extract information from them in a programmer-friendly format.  c* The abstract type [backtrace_slot] represents a single slot of a backtrace. @since 4.02  #* Returns the slots of a raw backtrace, or [None] if none of them contain useful information. In the return array, the slot at index [0] corresponds to the most recent function call, raise, or primitive [get_backtrace] call in the trace. Some possible reasons for returning [None] are as follow: - none of the slots in the trace come from modules compiled with debug information ([-g]) - the program is a bytecode program that has not been linked with debug information enabled ([ocamlc -g]) @since 4.02 " /* Returns the slots of a single raw backtrace entry, or [None] if this entry lacks debug information. Slots are returned in the same order as [backtrace_slots]: the slot at index [0] is the most recent call, raise, or primitive, and subsequent slots represent callers. @since 4.12 -* @since 5.2 ^-* @since 5.2 G * The type of location information found in backtraces. [start_char] and [end_char] are positions relative to the beginning of [line_number]. [end_col] is relative to the beginning of [end_line]. @since 4.02 8.* @since 4.02  * [is_raise slot] is [true] when [slot] refers to a raising point in the code, and [false] when it comes from a simple function call. @since 4.02 0 * [is_inline slot] is [true] when [slot] refers to a call that got inlined by the compiler, and [false] when it comes from any other context. @since 4.04 ꠠ {* [location slot] returns the location information of the slot, if available, and [None] otherwise. 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  * [name slot] returns the name of the function or definition enclosing the location referred to by the slot. [name slot] returns None if the name is unavailable, which may happen for the same reasons as [location] returning None. @since 4.11 @ * [format pos slot] returns the string representation of [slot] as [raw_backtrace_to_string] would format it, assuming it is the [pos]-th element of the backtrace: the [0]-th element is pretty-printed differently than the others. Whole-backtrace printing functions also skip some uninformative slots; in that case, [format pos slot] returns [None]. @since 4.02 ٠:* {1 Raw backtrace slots}  * This type is used to iterate over the slots of a [raw_backtrace]. For most purposes, [backtrace_slots_of_raw_entry] is easier to use. Like [raw_backtrace_entry], values of this type are process-specific and must absolutely not be marshalled, and are unsafe to use for this reason (marshalling them may not fail, but un-marshalling and using the result will result in undefined behavior). Elements of this type can still be compared and hashed: when two elements are equal, then they represent the same source location (the converse is not necessarily true in presence of inlining, for example). @since 4.02 f h* [raw_backtrace_length bckt] returns the number of slots in the backtrace [bckt]. @since 4.02  u* [get_raw_backtrace_slot bckt pos] returns the slot in position [pos] in the backtrace [bckt]. @since 4.02 Ƞ j* Extracts the user-friendly [backtrace_slot] from a low-level [raw_backtrace_slot]. @since 4.02  h* [get_raw_backtrace_next_slot slot] returns the next slot inlined, if any. Sample code to iterate over all frames (inlined and non-inlined): {[ (* Iterate over inlined frames *) let rec iter_raw_backtrace_slot f slot = f slot; match get_raw_backtrace_next_slot slot with | None -> () | Some slot' -> iter_raw_backtrace_slot f slot' (* Iterate over stack frames *) let iter_raw_backtrace f bt = for i = 0 to raw_backtrace_length bt - 1 do iter_raw_backtrace_slot f (get_raw_backtrace_slot bt i) done ]} @since 4.04 -6* {1 Exception slots}  * [Printexc.exn_slot_id] returns an integer which uniquely identifies the constructor used to create the exception value [exn] (in the current runtime). @since 4.02 ٠ * [Printexc.exn_slot_name exn] returns the internal name of the constructor used to create the exception value [exn]. @since 4.02 #*/*x l* {1 Obj printer} Unsafe printer used in this module and exposed to the other standard library module h@?)../ocamlc0-strict-sequence(-absname"-w5+a-4-9-41-42-44-45-48"-g+-warn-error"+A*-bin-annot)-nostdlib*-principal"-o4stdlib__Printexc.cmi"-cwx D/builds/workspace/precheck/flambda/false/label/ocaml-linux-32/stdlib @@07=94qwhq3|{{|||||@z@@8CamlinternalFormatBasics0%FU(Q/Tu&Stdlib0Lku]8_٠-Stdlib__Int320 u&+Stdlib__Obj0]'kZ<栠00@DP,MP$Q1s.@00@DP,MP$Q1s.An@@ L@  @9@ Ð @Ґ %@f֕[  @@@ l @@ʰC@ߐ@@$@KX@ԕV  N@ܒϐ @ I  ] |@G0@@Ɛ@3L L @ א @@  L 3 @  @*  @Rs@ Ɛ @PZB  @@P@@