| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Charon.Exception
Description
Provides exceptions used by Charon.
Synopsis
- newtype TrashEntryNotFoundE = MkTrashEntryNotFoundE (PathI TrashEntryFileName)
- newtype TrashEntryWildcardNotFoundE = MkTrashEntryWildcardNotFoundE (PathI TrashEntryFileName)
- data TrashEntryFileNotFoundE = MkTrashEntryFileNotFoundE (PathI TrashHome) (PathI TrashEntryFileName)
- data TrashEntryInfoNotFoundE = MkTrashEntryInfoNotFoundE (PathI TrashHome) (PathI TrashEntryFileName)
- data TrashEntryInfoBadExtE = MkTrashEntryInfoBadExtE (PathI TrashEntryFileName) OsPath OsPath
- newtype RenameDuplicateE = MkRenameDuplicateE (PathI TrashEntryPath)
- data RestoreCollisionE = MkRestoreCollisionE (PathI TrashEntryFileName) (PathI TrashEntryOriginalPath)
- data RootE = MkRootE
- data EmptyPathE = MkEmptyPathE
- newtype DotsPathE = MkDotsPathE (PathI TrashEntryOriginalPath)
- newtype FileNameEmptyE = MkFileNameEmptyE (PathI TrashEntryOriginalPath)
- data UniquePathNotPrefixE = MkUniquePathNotPrefixE (PathI TrashEntryFileName) (PathI TrashEntryFileName)
- data InfoDecodeE = MkInfoDecodeE (PathI TrashEntryInfo) ByteString String
- newtype EmptySearchResults = MkEmptySearchResults (UniqueSeq (PathI TrashEntryFileName))
- newtype BackendDetectE = MkBackendDetectE Backend
Trash
Entries
General
newtype TrashEntryNotFoundE Source #
Generic trash path not found error. Distinct from TrashEntryFileNotFoundE
in that the latter indicates that the entry exists in trash/info but not
trash/files, whereas this exception is less specific i.e. we found nothing
in trash/info but did not look in trash/files.
Constructors
| MkTrashEntryNotFoundE (PathI TrashEntryFileName) |
Instances
| Exception TrashEntryNotFoundE Source # | |
Defined in Charon.Exception Methods toException :: TrashEntryNotFoundE -> SomeException # fromException :: SomeException -> Maybe TrashEntryNotFoundE # | |
| Show TrashEntryNotFoundE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> TrashEntryNotFoundE -> ShowS # show :: TrashEntryNotFoundE -> String # showList :: [TrashEntryNotFoundE] -> ShowS # | |
newtype TrashEntryWildcardNotFoundE Source #
Error for not finding any files via wildcard search.
Constructors
| MkTrashEntryWildcardNotFoundE (PathI TrashEntryFileName) |
Instances
| Exception TrashEntryWildcardNotFoundE Source # | |
Defined in Charon.Exception | |
| Show TrashEntryWildcardNotFoundE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> TrashEntryWildcardNotFoundE -> ShowS # show :: TrashEntryWildcardNotFoundE -> String # showList :: [TrashEntryWildcardNotFoundE] -> ShowS # | |
Partial success
data TrashEntryFileNotFoundE Source #
Path found in the index but not files.
Constructors
| MkTrashEntryFileNotFoundE (PathI TrashHome) (PathI TrashEntryFileName) |
Instances
| Exception TrashEntryFileNotFoundE Source # | |
Defined in Charon.Exception | |
| Show TrashEntryFileNotFoundE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> TrashEntryFileNotFoundE -> ShowS # show :: TrashEntryFileNotFoundE -> String # showList :: [TrashEntryFileNotFoundE] -> ShowS # | |
data TrashEntryInfoNotFoundE Source #
Path found files but not index.
Constructors
| MkTrashEntryInfoNotFoundE (PathI TrashHome) (PathI TrashEntryFileName) |
Instances
| Exception TrashEntryInfoNotFoundE Source # | |
Defined in Charon.Exception | |
| Show TrashEntryInfoNotFoundE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> TrashEntryInfoNotFoundE -> ShowS # show :: TrashEntryInfoNotFoundE -> String # showList :: [TrashEntryInfoNotFoundE] -> ShowS # | |
data TrashEntryInfoBadExtE Source #
Unexpected file extension error.
Constructors
| MkTrashEntryInfoBadExtE (PathI TrashEntryFileName) OsPath OsPath |
Instances
| Exception TrashEntryInfoBadExtE Source # | |
Defined in Charon.Exception | |
| Show TrashEntryInfoBadExtE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> TrashEntryInfoBadExtE -> ShowS # show :: TrashEntryInfoBadExtE -> String # showList :: [TrashEntryInfoBadExtE] -> ShowS # | |
Misc
newtype RenameDuplicateE Source #
Could not rename file due to duplicate names.
Constructors
| MkRenameDuplicateE (PathI TrashEntryPath) |
Instances
| Exception RenameDuplicateE Source # | |
Defined in Charon.Exception Methods toException :: RenameDuplicateE -> SomeException # | |
| Show RenameDuplicateE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> RenameDuplicateE -> ShowS # show :: RenameDuplicateE -> String # showList :: [RenameDuplicateE] -> ShowS # | |
data RestoreCollisionE Source #
Collision with existing file when attempting a restore.
Constructors
| MkRestoreCollisionE (PathI TrashEntryFileName) (PathI TrashEntryOriginalPath) |
Instances
| Exception RestoreCollisionE Source # | |
Defined in Charon.Exception Methods toException :: RestoreCollisionE -> SomeException # | |
| Show RestoreCollisionE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> RestoreCollisionE -> ShowS # show :: RestoreCollisionE -> String # showList :: [RestoreCollisionE] -> ShowS # | |
Exception for deleting the root.
Constructors
| MkRootE |
Instances
| Exception RootE Source # | |
Defined in Charon.Exception Methods toException :: RootE -> SomeException # fromException :: SomeException -> Maybe RootE # displayException :: RootE -> String # | |
| Show RootE Source # | |
data EmptyPathE Source #
Exception for deleting an empty path.
Constructors
| MkEmptyPathE |
Instances
| Exception EmptyPathE Source # | |
Defined in Charon.Exception Methods toException :: EmptyPathE -> SomeException # fromException :: SomeException -> Maybe EmptyPathE # displayException :: EmptyPathE -> String # | |
| Show EmptyPathE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> EmptyPathE -> ShowS # show :: EmptyPathE -> String # showList :: [EmptyPathE] -> ShowS # | |
Exception for deleting the special dots paths.
Constructors
| MkDotsPathE (PathI TrashEntryOriginalPath) |
Instances
| Exception DotsPathE Source # | |
Defined in Charon.Exception Methods toException :: DotsPathE -> SomeException # fromException :: SomeException -> Maybe DotsPathE # displayException :: DotsPathE -> String # | |
| Show DotsPathE Source # | |
newtype FileNameEmptyE Source #
Exception for deriving an empty file name.
Constructors
| MkFileNameEmptyE (PathI TrashEntryOriginalPath) |
Instances
| Exception FileNameEmptyE Source # | |
Defined in Charon.Exception Methods toException :: FileNameEmptyE -> SomeException # | |
| Show FileNameEmptyE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> FileNameEmptyE -> ShowS # show :: FileNameEmptyE -> String # showList :: [FileNameEmptyE] -> ShowS # | |
data UniquePathNotPrefixE Source #
Exception for when the original name is not a prefix of the derived unique name.
Constructors
| MkUniquePathNotPrefixE (PathI TrashEntryFileName) (PathI TrashEntryFileName) |
Instances
| Exception UniquePathNotPrefixE Source # | |
Defined in Charon.Exception Methods toException :: UniquePathNotPrefixE -> SomeException # fromException :: SomeException -> Maybe UniquePathNotPrefixE # | |
| Show UniquePathNotPrefixE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> UniquePathNotPrefixE -> ShowS # show :: UniquePathNotPrefixE -> String # showList :: [UniquePathNotPrefixE] -> ShowS # | |
data InfoDecodeE Source #
Exception for decoding.
Constructors
| MkInfoDecodeE (PathI TrashEntryInfo) ByteString String |
Instances
| Exception InfoDecodeE Source # | |
Defined in Charon.Exception Methods toException :: InfoDecodeE -> SomeException # fromException :: SomeException -> Maybe InfoDecodeE # displayException :: InfoDecodeE -> String # | |
| Show InfoDecodeE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> InfoDecodeE -> ShowS # show :: InfoDecodeE -> String # showList :: [InfoDecodeE] -> ShowS # | |
newtype EmptySearchResults Source #
No search results.
Constructors
| MkEmptySearchResults (UniqueSeq (PathI TrashEntryFileName)) |
Instances
| Exception EmptySearchResults Source # | |
Defined in Charon.Exception Methods toException :: EmptySearchResults -> SomeException # fromException :: SomeException -> Maybe EmptySearchResults # | |
| Show EmptySearchResults Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> EmptySearchResults -> ShowS # show :: EmptySearchResults -> String # showList :: [EmptySearchResults] -> ShowS # | |
newtype BackendDetectE Source #
Unexpected backend error.
Constructors
| MkBackendDetectE Backend |
Instances
| Exception BackendDetectE Source # | |
Defined in Charon.Exception Methods toException :: BackendDetectE -> SomeException # | |
| Show BackendDetectE Source # | |
Defined in Charon.Exception Methods showsPrec :: Int -> BackendDetectE -> ShowS # show :: BackendDetectE -> String # showList :: [BackendDetectE] -> ShowS # | |