{-# language DeriveDataTypeable #-}
{-# language LambdaCase #-}
module Control.Exception.Common where
import Control.Exception
import Data.Typeable
data ImportError = FileParseError String String deriving (Eq, Typeable)
instance Show ImportError where
show = \case
FileParseError s s2 -> unwords [s, ": File parse error:", s2]
instance Exception ImportError
data ExportError = FormatExportNotSupported String String deriving (Eq, Typeable)
instance Show ExportError where
show = \case
FormatExportNotSupported s sty -> unwords [s, ":", sty, "format not supported"]
instance Exception ExportError