Portable tracing: catch runtime errors as far as possible.

olaf: Thu Mar 14 19:14:40 CET 2002 Update of /usr/src/master/nhc/src/hat/lib In directory hinken:/tmp/cvs-serv29285/src/hat/lib Modified Files: Hat.hs PreludeBuiltin.hs PreludeBuiltinTypes.hx TPreludeBuiltinTypes.hs hat.c hat.h Log Message: Portable tracing: catch runtime errors as far as possible. Errors used to cause abortion of the traced program without the trace file being properly finished (stack in memory flushed and error message and entry point written to trace). Pattern match failure had always been caught correctly and interruption by Control C was assured by a previous modification. Now calls of Prelude.error finalise the trace correctly (the implementation of error is special, in PreludeBuiltinTypes). Also the whole traced program is surrounded by a "catch" which finalises the trace for all caught exceptions. Unfortunately there are still errors which do not rise an exception (e.g. arithmetic errors and call of "error" in primtive code in ghc). Which errors are not caught and hence lead to an incomplete trace (no error message and many arguments seem not to be evaluated) depends on the Haskell compiler.
participants (1)
-
olaf@sparud.net