haskellHQ
haskellHQ

Reputation: 1047

To handle IOError, which method should I use?

I came across a function that, according to its documentation, can throw IOError. I want to handle this.

It looks like there are multiple ways of doing it. Control.Exception is one. System.IO.Error is another.

Upvotes: 0

Views: 84

Answers (1)

V. Semeria
V. Semeria

Reputation: 3256

type IOError = IOException

so both finish in Control.Exception.Base, ie catch. System.IO.Error is just a specialization package, to help you deal with those exceptions that are IO.

Upvotes: 1

Related Questions