Let’s make the following assumptions:
- my program aborts due to an uncaught exception
- I have no idea what the type of that exception is
- the printed error message contains no hint on the exception type
How would I find out the type of that exception?
Minimal example:
main = error "foo"
(Here it’s of course ErrorCall, but you can’t tell from the error message.)
Yes. All
Exceptiontypes must be instances ofTypeable, assuming you use the new exceptions API.Results: