[cvs-nhc98] patch applied (hat): Portable tracing: catch runtime errors as far as possible.

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:14:55 EDT 2006


Thu Mar 14 10:14:39 PST 2002  olaf
  * 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.

    M ./src/hatlib/Hat.hs -2 +20
    M ./src/hatlib/PreludeBuiltin.hs -7
    M ./src/hatlib/PreludeBuiltinTypes.hx +1
    M ./src/hatlib/TPreludeBuiltinTypes.hs +10
    M ./src/hatlib/hat-c.c -6 +5
    M ./src/hatlib/hat-c.h -1 +1


More information about the Cvs-nhc98 mailing list