Question
is it possible in ML catch every possible exception? for example if I don't know what exception might be
Solution
The handle
statement lets you pattern match exceptions, so you can use something like handle _
to match anything, e.g.
hd [] handle _ => 0
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow