From the description of the Ocaml 3.10 release:
"Printing of stack backtraces on uncaught exceptions, previously
available only for bytecode-compiled programs, "
I have inferred that my own version 3.09.3 release should print out a
backtrace for an out of bounds index into an array. Is this the case?
If so how do I turn on this feature?
For example, here is a trivial program:
<BEGIN>
open Printf;;
printf "starting testn";;
let array = Array.create 10 0;;
printf "first number: %dn" array.(0);;
printf "this should produce an error %dn" array.(11);;
printf "end of testn";;
<END>
which I compile with the -g option (because I thought maybe -g would
turn this feature on.
Then I run the program:
aisubuntu:~/workspace/ocode$ ./foo
starting test
first number: 0
Fatal error: exception Invalid_argument("index out of bounds")
aisubuntu:~/workspace/ocode$