-----------------------------------------------------------------------------
-- |
-- Module      :  Data.HodaTime.Exceptions
-- Copyright   :  (C) 2016 Jason Johnson
-- License     :  BSD-style (see the file LICENSE)
-- Maintainer  :  Jason Johnson <jason.johnson.081@gmail.com>
-- Stability   :  experimental
-- Portability :  TBD
--
-- Exceptions defined by this library.
----------------------------------------------------------------------------
module Data.HodaTime.Exceptions
(
  -- * Types
   DayRequiredException(..)
  ,MonthRequiredException(..)
  ,YearRequiredException(..)
)
where

import Control.Exception (Exception)
import Data.Typeable (Typeable)

-- Parsing

-- | Day is required for parse pattern
data DayRequiredException = DayRequiredException
  deriving (Typeable, Int -> DayRequiredException -> ShowS
[DayRequiredException] -> ShowS
DayRequiredException -> String
(Int -> DayRequiredException -> ShowS)
-> (DayRequiredException -> String)
-> ([DayRequiredException] -> ShowS)
-> Show DayRequiredException
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DayRequiredException -> ShowS
showsPrec :: Int -> DayRequiredException -> ShowS
$cshow :: DayRequiredException -> String
show :: DayRequiredException -> String
$cshowList :: [DayRequiredException] -> ShowS
showList :: [DayRequiredException] -> ShowS
Show)

instance Exception DayRequiredException

-- | Month is required for parse pattern
data MonthRequiredException = MonthRequiredException
  deriving (Typeable, Int -> MonthRequiredException -> ShowS
[MonthRequiredException] -> ShowS
MonthRequiredException -> String
(Int -> MonthRequiredException -> ShowS)
-> (MonthRequiredException -> String)
-> ([MonthRequiredException] -> ShowS)
-> Show MonthRequiredException
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MonthRequiredException -> ShowS
showsPrec :: Int -> MonthRequiredException -> ShowS
$cshow :: MonthRequiredException -> String
show :: MonthRequiredException -> String
$cshowList :: [MonthRequiredException] -> ShowS
showList :: [MonthRequiredException] -> ShowS
Show)

instance Exception MonthRequiredException

-- | Year is required for parse pattern
data YearRequiredException = YearRequiredException
  deriving (Typeable, Int -> YearRequiredException -> ShowS
[YearRequiredException] -> ShowS
YearRequiredException -> String
(Int -> YearRequiredException -> ShowS)
-> (YearRequiredException -> String)
-> ([YearRequiredException] -> ShowS)
-> Show YearRequiredException
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> YearRequiredException -> ShowS
showsPrec :: Int -> YearRequiredException -> ShowS
$cshow :: YearRequiredException -> String
show :: YearRequiredException -> String
$cshowList :: [YearRequiredException] -> ShowS
showList :: [YearRequiredException] -> ShowS
Show)

instance Exception YearRequiredException