[MLton-user] Lack of information with -const 'Exn.keepHistory true'

Matthew Fluet fluet at tti-c.org
Tue Jan 23 16:18:18 PST 2007


> The application seems to raise an exception during the execution of one of
> the basis library functions and here is the message I get when I handle the
> exception and print the history in the "main" :
> 
> "
> exception SysErr(OS.SysErr(name="Invalid argument", syserror=inval)) raised.
> raised at: General.o <basis>/general/general.sml 29.14
>            PosixError.raiseSys <basis>/posix/error.sml 51.11
> 
> In this case, using the option does not really help. I am surprised it does
> not print the full call stack as explained on the website.
> 
> Any idea how I could make it more efficient ?

By default, the profiling mechanism (and, by extension, the exn history) 
doesn't trace into the Basis Library implementation.  To enable tracing 
into the Basis Library, use "-profile-include '<basis>'".  You may also 
want to use "-profile-branch true -profile-raise true", which can give 
even more accurate traces, including which branch of an "if" or "case" 
statement is on the stack.





More information about the MLton-user mailing list