graceful degradation in the case of errors
Claus Reinke
claus.reinke at talk21.com
Thu Feb 15 18:28:26 EST 2007
something has been bugging me about recent windows hugs versions, but
I always forget to report it, and Neil's mentioning file handles reminded me:
1. when any source module has an error on load, Hugs stops in the middle
of that module, being entirely useless until I comment out the offending
lines, save and reload, or unload everything but the Prelude.
I'd prefer if Hugs reported the error in the offending module, but did
not commit to loading it unless successful. In other words, loading
modules ought to be a series of transactions:
- start transaction loading module X
- if error occurs, report, abort current transaction, and stop loading
- if free of errors, commit to loading module X, and continue loading
the first thing I tend to try when I get an error on load is to inspect
the types/behaviour of some of the things loaded before the error, or
try to figure out what I've misunderstood about the things used at the
error location. but with the current arrangement, I can't use my Hugs
session to do any of that.
2. problem 1 is made worse because minhugs seems to do an implicit
load (at the next command) when the file changes on disc.
this means that I can't save edits in the editor unless I'm sure the
code loads without errors, and it also means that I can't use my
Hugs session independently of my editing.
I'm pretty sure 2 is recent, 1 may have been standard Hugs behaviour
for some time. but both are rather annoying, imho.
thanks,
claus
More information about the Hugs-Bugs
mailing list