HsSVN-0.1: (Part of) Subversion binding for HaskellContentsIndex
Subversion.Error
Description
Common exception handling for Subversion. The C API of the Subversion returns an error as a function result, but in HsSVN errors are thrown as a DynException.
Synopsis
data SvnError
svnErrCode :: SvnError -> SvnErrCode
svnErrMsg :: SvnError -> String
throwSvnErr :: SvnError -> IO a
data SvnErrCode
= AprEEXIST
| AprENOENT
| DirNotEmpty
| ReposLocked
| FsAlreadyExists
| FsConflict
| FsNoSuchRevision
| FsNotDirectory
| FsNotFile
| FsNotFound
| UnknownError !Int
Documentation
data SvnError
SvnError represents a Subversion error.
show/hide Instances
Typeable SvnError
svnErrCode :: SvnError -> SvnErrCode
svnErrCode err returns a SvnErrCode for an error object.
svnErrMsg :: SvnError -> String
svnErrMsg err returns an error message for an error object.
throwSvnErr :: SvnError -> IO a
throwSvnErr err throws an SvnError object in an IO monad. You usually don't need to use this directly.
data SvnErrCode
SvnErrCode represents a Subversion error code. As you see, not all errors are translated to Haskell constructors yet. Uncovered error codes are temporarily represented as UnknownError num.
Constructors
AprEEXISTAPR EEXIST error: typically it means something you tried to create was already there.
AprENOENTAPR ENOENT error: typically it means something you tried to use wasn't there.
DirNotEmptyThe directory needs to be empty but it's not.
ReposLockedThe repository was locked, perhaps for db recovery.
FsAlreadyExistsThe item already existed in filesystem.
FsConflictMerge conflict has occured during commit.
FsNoSuchRevisionIt was an invalid filesystem revision number.
FsNotDirectoryIt was not a filesystem directory entry.
FsNotFileIt was not a filesystem file entry.
FsNotFoundIt wasn't there in filesystem.
UnknownError !IntAny other errors than above. You shouldn't rely on the absence of appropriate SvnErrCode constructors because they may be added in the future version of HsSVN. If that happens to you, your code stops working.
show/hide Instances
Produced by Haddock version 0.8