top-level-handler.sml
Matthew Fluet
fluet@CS.Cornell.EDU
Sun, 13 Jan 2002 15:34:48 -0500 (EST)
Is there a minor bug in top-level-handler.sml:
fun handler exn =
(message "unhandled exception: "
; let
fun loop e =
case e of
Fail s => (message "Fail "; message s)
| IO.Io {cause, function, ...} => (message "IO "
; message function
; message ": "
; loop cause)
| _ => message (exnName exn)
in
loop exn
end
Should the default case in loop print the exnName of e instead of exn?
Seems that any IO exception would just terminate with "IO" instead of the
cause.