base64-1.0: A modern Base64 library

Copyright | (c) 2019-2023 Emily Pillmore
License | BSD-style
Maintainer | Emily Pillmore <emilypi@cohomolo.gy>
Stability | stable
Portability | non-portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Text.Encoding.Base64.Error

Description

This module contains the error types raised (not as exceptions!) in the decoding process.

Synopsis

- data Base64Error e
  - = DecodeError !Text
  - | ConversionError !e

# Documentation

data Base64Error e Source #

This data type represents the type of decoding errors of various kinds as they pertain to decoding `Text` values. Namely, to distinguish between decoding errors from opaque unicode exceptions caught in the unicode decoding process.

Constructors

DecodeError !Text | The error associated with decoding failure as a result of the Base64 decoding process
ConversionError !e | The error associated with the decoding failure as a result of the conversion process

#### Instances

Instances details

NFData e => NFData (Base64Error e) Source # | Since: 4.2.2
Instance details Defined in Data.Text.Encoding.Base64.Error Methods rnf :: Base64Error e -> () Source #
Exception e => Exception (Base64Error e) Source # | Since: 4.2.2
Instance details Defined in Data.Text.Encoding.Base64.Error Methods toException :: Base64Error e -> SomeException Source # fromException :: SomeException -> Maybe (Base64Error e) Source # displayException :: Base64Error e -> String Source # backtraceDesired :: Base64Error e -> Bool Source #
Generic (Base64Error e) Source # |

Instance details

Defined in Data.Text.Encoding.Base64.Error

Associated Types

type Rep (Base64Error e) | Since: base64-4.2.2

Instance details

Defined in Data.Text.Encoding.Base64.Error

type Rep (Base64Error e) = D1 ('MetaData "Base64Error" "Data.Text.Encoding.Base64.Error" "base64-1.0-3qCv0NI74kI8mkW37dcpRF" 'False) (C1 ('MetaCons "DecodeError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "ConversionError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 e)))

Methods

from :: Base64Error e -> Rep (Base64Error e) x Source #

to :: Rep (Base64Error e) x -> Base64Error e Source #

Show e => Show (Base64Error e) Source # |
Instance details Defined in Data.Text.Encoding.Base64.Error Methods showsPrec :: Int -> Base64Error e -> ShowS Source # show :: Base64Error e -> String Source # showList :: [Base64Error e] -> ShowS Source #
Eq e => Eq (Base64Error e) Source # |
Instance details Defined in Data.Text.Encoding.Base64.Error Methods (==) :: Base64Error e -> Base64Error e -> Bool Source # (/=) :: Base64Error e -> Base64Error e -> Bool Source #
type Rep (Base64Error e) Source # | Since: 4.2.2

Instance details

Defined in Data.Text.Encoding.Base64.Error

type Rep (Base64Error e) = D1 ('MetaData "Base64Error" "Data.Text.Encoding.Base64.Error" "base64-1.0-3qCv0NI74kI8mkW37dcpRF" 'False) (C1 ('MetaCons "DecodeError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "ConversionError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 e)))