| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.Aviation.Metar.METARError
Description
A single failure during METAR lookup, tagged with the source (which BOM state or which upstream API) and either a connection failure or a parse-level reason.
Synopsis
- data METARError
- connError :: String -> ConnError -> METARError
- parseError :: String -> String -> METARError
Documentation
data METARError Source #
Description of one thing that went wrong at one source.
>>>connError "NOAA" (ErrorMisc "boom")ConnErrorAt "NOAA" (ErrorMisc "boom")>>>parseError "New-South-Wales" "not found"ParseErrorAt "New-South-Wales" "not found"
Constructors
| ConnErrorAt String ConnError | Network failure at the named source. |
| ParseErrorAt String String | Non-network failure at the named source, e.g. HTTP 404 or ICAO absent from the response. |
Instances
| Show METARError Source # | |
Defined in Data.Aviation.Metar.METARError Methods showsPrec :: Int -> METARError -> ShowS # show :: METARError -> String # showList :: [METARError] -> ShowS # | |
| Eq METARError Source # | |
Defined in Data.Aviation.Metar.METARError | |
connError :: String -> ConnError -> METARError Source #
Build a ConnErrorAt.
>>>connError "BOM" (ErrorMisc "response timeout")ConnErrorAt "BOM" (ErrorMisc "response timeout")
parseError :: String -> String -> METARError Source #
Build a ParseErrorAt.
>>>parseError "NOAA" "HTTP 404"ParseErrorAt "NOAA" "HTTP 404"