
22 Nov
2008
22 Nov
'08
10:55 a.m.
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.