[Haskell-beginners] Maybe, Either

Michael P Mossey mpm at alumni.caltech.edu
Mon Sep 14 16:39:04 EDT 2009


Michael Snoyman wrote:
> Can you give me a better idea of what you mean by catching errors? That 
> could mean a lot of things.
> 
> Michael
Hi Michael,
I mean that I need my software not to exit the program on an error condition, 
but have a higher level "catch" of that condition which handles it gracefully. 
I'm writing a musical score editor for personal use in my spare hobby time. 
Because it's just a bit of spare time, I can't make a promise my software won't 
have bugs. When I'm working on a score, I don't want to lose my work when an 
error occurs, such as internal errors that violate the invariants I've 
established in my data structures. So any action that results in an error should 
trigger a message box that says "such-and-such error" and otherwise leave the 
data unchanged. Then I can save my work and attempt to debug the problem.

Thanks,
Mike



More information about the Beginners mailing list