module Hasql.Private.Errors where
import Hasql.Private.Prelude
data QueryError
  = QueryError ByteString [Text] CommandError
  deriving (Int -> QueryError -> ShowS
[QueryError] -> ShowS
QueryError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QueryError] -> ShowS
$cshowList :: [QueryError] -> ShowS
show :: QueryError -> String
$cshow :: QueryError -> String
showsPrec :: Int -> QueryError -> ShowS
$cshowsPrec :: Int -> QueryError -> ShowS
Show, QueryError -> QueryError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueryError -> QueryError -> Bool
$c/= :: QueryError -> QueryError -> Bool
== :: QueryError -> QueryError -> Bool
$c== :: QueryError -> QueryError -> Bool
Eq, Typeable)
instance Exception QueryError
data CommandError
  = 
    
    
    
    ClientError (Maybe ByteString)
  | 
    
    ResultError ResultError
  deriving (Int -> CommandError -> ShowS
[CommandError] -> ShowS
CommandError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CommandError] -> ShowS
$cshowList :: [CommandError] -> ShowS
show :: CommandError -> String
$cshow :: CommandError -> String
showsPrec :: Int -> CommandError -> ShowS
$cshowsPrec :: Int -> CommandError -> ShowS
Show, CommandError -> CommandError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CommandError -> CommandError -> Bool
$c/= :: CommandError -> CommandError -> Bool
== :: CommandError -> CommandError -> Bool
$c== :: CommandError -> CommandError -> Bool
Eq)
data ResultError
  = 
    ServerError
      ByteString
      
      
      
      ByteString
      
      
      (Maybe ByteString)
      
      
      (Maybe ByteString)
      
      
      
      
      (Maybe Int)
      
      
  | 
    
    
    UnexpectedResult Text
  | 
    
    RowError Int Int RowError
  | 
    
    UnexpectedAmountOfRows Int
  deriving (Int -> ResultError -> ShowS
[ResultError] -> ShowS
ResultError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResultError] -> ShowS
$cshowList :: [ResultError] -> ShowS
show :: ResultError -> String
$cshow :: ResultError -> String
showsPrec :: Int -> ResultError -> ShowS
$cshowsPrec :: Int -> ResultError -> ShowS
Show, ResultError -> ResultError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResultError -> ResultError -> Bool
$c/= :: ResultError -> ResultError -> Bool
== :: ResultError -> ResultError -> Bool
$c== :: ResultError -> ResultError -> Bool
Eq)
data RowError
  = 
    
    EndOfInput
  | 
    
    UnexpectedNull
  | 
    
    
    ValueError Text
  deriving (Int -> RowError -> ShowS
[RowError] -> ShowS
RowError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RowError] -> ShowS
$cshowList :: [RowError] -> ShowS
show :: RowError -> String
$cshow :: RowError -> String
showsPrec :: Int -> RowError -> ShowS
$cshowsPrec :: Int -> RowError -> ShowS
Show, RowError -> RowError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RowError -> RowError -> Bool
$c/= :: RowError -> RowError -> Bool
== :: RowError -> RowError -> Bool
$c== :: RowError -> RowError -> Bool
Eq)