Pieter Laeremans wrote:
Hello,
I've written a cgi script in haskell, it crashes sometimes with the
error message Prelude . tail : empty list
Yup, been there, done that.
First, look for all the uses of tail in your program and think hard
about all of them. Wrap them in assert or trace
Hello,
I've written a cgi script in haskell, it crashes sometimes with the error
message Prelude . tail : empty list
In Java we would use this approach to log the erro
try {
} catch (Exception e) {
}
--
Pieter Laeremans [EMAIL PROTECTED]
The future is here. It's just not evenly
This :
Prelude let f = (\x - return something went wrong) :: IOError - IO
String
Prelude let t = return $ show $ too short list !! 100 :: IO String
Prelude catch t f
*** Exception: Prelude.(!!): index too large
doesn't work.
You might be interested in the difference between