-- |
  Module       : Data . 
-- License     : BSD-style
  Maintainer   :   <  >
-- Stability   : experimental
-- Portability : unknown
--
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE BangPatterns #-}
module Data.ASN1.Error
    (
    -- * Errors types
      ASN1Error(..)
    ) where

import Control.Exception (Exception)
import Data.Typeable

-- | Possible errors during parsing operations
  ^ Unexpected EOC in the stream .
               | StreamInfinitePrimitive     -- ^ Invalid primitive with infinite length in a stream.
               | StreamConstructionWrongSize -- ^ A construction goes over the size specified in the header.
  ^ An unexpected situation has come up parsing an ASN1 event stream .
               | ParsingHeaderFail String    -- ^ Parsing an invalid header.
               | ParsingPartial              -- ^ Parsing is not finished, there is construction unended.
               | TypeNotImplemented String   -- ^ Decoding of a type that is not implemented. Contribution welcome.
               | TypeDecodingFailed String   -- ^ Decoding of a knowed type failed.
               | TypePrimitiveInvalid String -- ^ Invalid primitive type
               | PolicyFailed String String -- ^ Policy failed including the name of the policy and the reason.
               deriving (Typeable, Show, Eq)

instance Exception ASN1Error

 |
 License     : BSD-style
 Stability   : experimental
 Portability : unknown

# LANGUAGE DeriveDataTypeable #
# LANGUAGE BangPatterns #
 * Errors types
 | Possible errors during parsing operations
 ^ Invalid primitive with infinite length in a stream.
 ^ A construction goes over the size specified in the header.
 ^ Parsing an invalid header.
 ^ Parsing is not finished, there is construction unended.
 ^ Decoding of a type that is not implemented. Contribution welcome.
 ^ Decoding of a knowed type failed.
 ^ Invalid primitive type
 ^ Policy failed including the name of the policy and the reason.
  Module       : Data . 
  Maintainer   :   <  >
module Data.ASN1.Error
    (
      ASN1Error(..)
    ) where

import Control.Exception (Exception)
import Data.Typeable

  ^ Unexpected EOC in the stream .
  ^ An unexpected situation has come up parsing an ASN1 event stream .
               deriving (Typeable, Show, Eq)

instance Exception ASN1Error
