This turns on stack trace recording unconditionally (the same
effect as if OCAMLRUNPARAM=b was always supplied), and also prints
stack traces to the log file if there is an exception.
See also:
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Printexc.html
Note that this requires OCaml >= 3.11.0.
virt-top
----------------------------------------------------------------------
-Copyright (C) 2007-2009 Richard W.M. Jones, Red Hat Inc.
+Copyright (C) 2007-2011 Richard W.M. Jones, Red Hat Inc.
http://et.redhat.com/~rjones/virt-top/
http://libvirt.org/ocaml/
http://libvirt.org/
Building
----------------------------------------------------------------------
+Note that the minimum version of OCaml supported (since 1.0.5) is
+OCaml 3.11.0.
+
./configure # Checks that you have all the required bits.
make all # Builds the bytecode version of the program.
let ((_, _, script_mode, _, _, _, _) as setup) = start_up () in
try
+ Printexc.record_backtrace true;
main_loop setup;
if not script_mode then endwin ();
false
| Libvirt.Virterror err ->
if not script_mode then endwin ();
prerr_endline (Libvirt.Virterror.to_string err);
+ Printexc.print_backtrace stderr;
true
| exn ->
if not script_mode then endwin ();
prerr_endline (s_ "Error" ^ ": " ^ Printexc.to_string exn);
+ Printexc.print_backtrace stderr;
true
let () =