[Haskell-cafe] Extensible Exceptions

David F. Place d at vidplace.com
Sat Nov 22 10:55:16 EST 2008


On Sat, 2008-11-22 at 15:27 +0000, Thomas Schilling wrote:
> >        *Main> tryJust errorCalls $ print $ [] !! 23
> >        tryJust errorCalls $ print $ [] !! 23^JLeft Prelude.(!!):
> index
> >        too large
> >
> >        *Main> tryJust errorCalls $ print $ throw NonTermination
> >        tryJust errorCalls $ print $ throw NonTermination^J***
> >        Exception: <<loop>>
> 
> It doesn't.  The last line is printed by GHCi.
> 
> Note the missing "Exception: " in the first call.
> 

!! uses error, so the first call shouldn't have "Exception: ."  It is
handled by tryJust and not rethrown.



More information about the Haskell-Cafe mailing list