Closed kderme closed 4 years ago
runGraphviz and related functions seem to throw IOException instead of GraphvizException when dot executable is missing. I think this happens because mapException is only indented to handle imprecise exceptions:
runGraphviz
IOException
GraphvizException
mapException
data ExceptionA = ExceptionA deriving (Show, Typeable, Exception) data ExceptionB = ExceptionB deriving (Show, Typeable, Exception) reify :: ExceptionA -> ExceptionB reify ExceptionA = ExceptionB mapException reify $ throwIO ExceptionA -> throws ExceptionA mapException reify $ throw ExceptionA -> throws ExceptionB mapException reify $ ((throw ExceptionA) :: IO ()) -> throws ExceptionB
In this pr I use handle instead.
handle
Btw, thanks for this library!
runGraphviz
and related functions seem to throwIOException
instead ofGraphvizException
when dot executable is missing. I think this happens becausemapException
is only indented to handle imprecise exceptions:In this pr I use
handle
instead.Btw, thanks for this library!