Skip to content
Newer
Older
100644 57 lines (51 sloc) 2.8 KB
29a2daa GPG support and code beautification for HackPort
der_eq@freenet.de authored Sep 11, 2005
1 {-# OPTIONS -fglasgow-exts #-}
2 module Error where
3
4 import Data.Typeable
5 import Distribution.Package
4cfa22e Changing program layout to a monadic state transformer
der_eq@freenet.de authored Oct 2, 2005
6 import Control.Monad.Error
7 import Control.Exception
29a2daa GPG support and code beautification for HackPort
der_eq@freenet.de authored Sep 11, 2005
8
9 data HackPortError
4cfa22e Changing program layout to a monadic state transformer
der_eq@freenet.de authored Oct 2, 2005
10 = ArgumentError String
11 | ConnectionFailed String String
7d1091e @kolmodin Change parameter to merge and remove --portage-category
kolmodin authored Aug 29, 2007
12 | PackageNotFound String
29a2daa GPG support and code beautification for HackPort
der_eq@freenet.de authored Sep 11, 2005
13 | InvalidTarballURL String String
14 | InvalidSignatureURL String String
15 | VerificationFailed String String
16 | DownloadFailed String String
17 | UnknownCompression String
18 | UnpackingFailed String Int
19 | NoCabalFound String
20 | ExtractionFailed String String Int
21 | CabalParseFailed String String
54702b5 Added support for overlay-guessing
der_eq@freenet.de authored Sep 21, 2005
22 | BashNotFound
23 | BashError String
24 | NoOverlay
25 | MultipleOverlays [String]
980982a Adding support for different verbosity-levels
der_eq@freenet.de authored Sep 21, 2005
26 | UnknownVerbosityLevel String
63b57b8 Adapted HackPort to the new Hackage interface
der_eq@freenet.de authored Jul 28, 2007
27 -- | WrongCacheVersion
28 -- | InvalidCache
29 | InvalidServer String
29a2daa GPG support and code beautification for HackPort
der_eq@freenet.de authored Sep 11, 2005
30 deriving (Typeable)
31
4cfa22e Changing program layout to a monadic state transformer
der_eq@freenet.de authored Oct 2, 2005
32 instance Error HackPortError
33
29a2daa GPG support and code beautification for HackPort
der_eq@freenet.de authored Sep 11, 2005
34 type HackPortResult a = Either
35
4cfa22e Changing program layout to a monadic state transformer
der_eq@freenet.de authored Oct 2, 2005
36 hackPortShowError :: HackPortError -> String
37 hackPortShowError err = case err of
290e060 Improved hackport's diff mode
der_eq@freenet.de authored Oct 23, 2005
38 ArgumentError str -> "Argument error: "++str
4cfa22e Changing program layout to a monadic state transformer
der_eq@freenet.de authored Oct 2, 2005
39 ConnectionFailed server reason -> "Connection to hackage server '"++server++"' failed: "++reason
7d1091e @kolmodin Change parameter to merge and remove --portage-category
kolmodin authored Aug 29, 2007
40 PackageNotFound pkg -> "Package '"++ pkg ++"' not found on server."
29a2daa GPG support and code beautification for HackPort
der_eq@freenet.de authored Sep 11, 2005
41 InvalidTarballURL url reason -> "Error while downloading tarball '"++url++"': "++reason
42 InvalidSignatureURL url reason -> "Error while downloading signature '"++url++"': "++reason
43 VerificationFailed file signature -> "Error while checking signature('"++signature++"') of '"++file++"'"
44 DownloadFailed url reason -> "Error while downloading '"++url++"': "++reason
45 UnknownCompression tarball -> "Couldn't guess compression type of '"++tarball++"'"
46 UnpackingFailed tarball code -> "Unpacking '"++tarball++"' failed with exit code '"++show code++"'"
47 NoCabalFound tarball -> "Tarball '"++tarball++"' doesn't contain a cabal file"
48 ExtractionFailed tarball file code -> "Extracting '"++file++"' from '"++tarball++"' failed with '"++show code++"'"
49 CabalParseFailed file reason -> "Error while parsing cabal file '"++file++"': "++reason
54702b5 Added support for overlay-guessing
der_eq@freenet.de authored Sep 21, 2005
50 BashNotFound -> "The 'bash' executable was not found. It is required to figure out your portage-overlay. If you don't want to install bash, use '-p path-to-overlay'"
51 BashError str -> "Error while guessing your portage-overlay. Either set PORTDIR_OVERLAY in /etc/make.conf or use '-p path-to-overlay'.\nThe error was: \""++str++"\""
52 MultipleOverlays overlays -> "You have the following overlays available: '"++unwords overlays++"'. Please choose one by using '-p path-to-overlay'"
53 NoOverlay -> "You don't have PORTDIR_OVERLAY set in '/etc/make.conf'. Please set it or use '-p path-to-overlay'"
980982a Adding support for different verbosity-levels
der_eq@freenet.de authored Sep 21, 2005
54 UnknownVerbosityLevel str -> "The verbosity level '"++str++"' is invalid. Please use debug,normal or silent"
63b57b8 Adapted HackPort to the new Hackage interface
der_eq@freenet.de authored Jul 28, 2007
55 --WrongCacheVersion -> "The version of the cache is too old. Please update the cache using 'hackport update'"
56 --InvalidCache -> "Could not read the cache. Please ensure that it's up to date using 'hackport update'"
Something went wrong with that request. Please try again.