hsp-0.2: HSP/Exception.hs
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- |
-- Module : HSP.Exception
-- Copyright : (c) Niklas Broberg 2004,
-- License : BSD-style (see the file LICENSE.txt)
--
-- Maintainer : Niklas Broberg, d00nibro@dtek.chalmers.se
-- Stability : experimental
-- Portability : requires undecidable and overlapping instances
--
-- Defines a datatype for runtime exceptions that may arise during
-- the evaluation of a HSP page.
-----------------------------------------------------------------------------
module HSP.Exception where
import Data.Typeable
data Exception
= WrongApplicationType -- ^ User tries to infer the wrong type
-- for the data stored in the 'Application' object.
| NoApplication -- ^ User tries to access application data in cgi mode.
| NoOutHeaders -- ^ User tries to add outgoing headers in cgi mode.
| ParameterLookupFailed String -- ^ User tried to do an irrefutable parameter lookup
-- that failed.
deriving (Eq, Show, Typeable)