module CabalGild.Exception.SpecifiedCrlfWithFormatMode where

import qualified Control.Monad.Catch as Exception

-- | This exception is thrown when the user specifies the CRLF leniency while
-- using the format mode. In other words, when @--mode=format@ and
-- @--crlf=anything@.
data SpecifiedCrlfWithFormatMode
  = SpecifiedCrlfWithFormatMode
  deriving (SpecifiedCrlfWithFormatMode -> SpecifiedCrlfWithFormatMode -> Bool
(SpecifiedCrlfWithFormatMode
 -> SpecifiedCrlfWithFormatMode -> Bool)
-> (SpecifiedCrlfWithFormatMode
    -> SpecifiedCrlfWithFormatMode -> Bool)
-> Eq SpecifiedCrlfWithFormatMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SpecifiedCrlfWithFormatMode -> SpecifiedCrlfWithFormatMode -> Bool
== :: SpecifiedCrlfWithFormatMode -> SpecifiedCrlfWithFormatMode -> Bool
$c/= :: SpecifiedCrlfWithFormatMode -> SpecifiedCrlfWithFormatMode -> Bool
/= :: SpecifiedCrlfWithFormatMode -> SpecifiedCrlfWithFormatMode -> Bool
Eq, Int -> SpecifiedCrlfWithFormatMode -> ShowS
[SpecifiedCrlfWithFormatMode] -> ShowS
SpecifiedCrlfWithFormatMode -> String
(Int -> SpecifiedCrlfWithFormatMode -> ShowS)
-> (SpecifiedCrlfWithFormatMode -> String)
-> ([SpecifiedCrlfWithFormatMode] -> ShowS)
-> Show SpecifiedCrlfWithFormatMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SpecifiedCrlfWithFormatMode -> ShowS
showsPrec :: Int -> SpecifiedCrlfWithFormatMode -> ShowS
$cshow :: SpecifiedCrlfWithFormatMode -> String
show :: SpecifiedCrlfWithFormatMode -> String
$cshowList :: [SpecifiedCrlfWithFormatMode] -> ShowS
showList :: [SpecifiedCrlfWithFormatMode] -> ShowS
Show)

instance Exception.Exception SpecifiedCrlfWithFormatMode where
  displayException :: SpecifiedCrlfWithFormatMode -> String
displayException = String -> SpecifiedCrlfWithFormatMode -> String
forall a b. a -> b -> a
const String
"cannot use --crlf when --mode is format"