[Haskell-cafe] How to catch all exceptions that could be caught?
magicloud.magiclouds at gmail.com
Thu Jan 12 04:03:34 CET 2012
With Prelude.catch, I could write "catch () $ \_ -> return Nothing".
But with Control.Exception.catch, I must specify a type for the "_".
What should I do?
PS: In Java document, a function declaration would tell us both the
incoming args and outgoing, AND what exceptions would it throw. But it
does not seem to exist in Haskell document? And the most awful part is
that even when the program failed with error message, I still did not
know what exception was this. Take "recv: does not exist (Connection
refused)" for example.
More information about the Haskell-Cafe