libssh2-0.1: FFI bindings to libssh2 SSH2 client library (http://libssh2.org/)

Safe HaskellNone

Network.SSH.Client.LibSSH2.Errors

Contents

Synopsis

Types

data NULL_POINTER Source

Exception to throw when null pointer received from libssh2.

Utilities

class HasCInt a => CIntResult a b whereSource

Methods

fromCInt :: a -> bSource

Instances

Num b => CIntResult CInt b 
Num b => CIntResult CLong b 
(Integral i, Num b) => CIntResult (i, a) (b, a) 
Num j => CIntResult (CInt, a, b) (j, a, b) 
Num j => CIntResult (CInt, a, b, c) (j, a, b, c) 

Functions

getLastError :: Session -> IO (Int, String)Source

Get last error information.

handleInt :: CIntResult a b => a -> IO bSource

Throw an exception if negative value passed, or return unchanged value.

handleNullPtr :: IsPointer a => Ptr () -> IO aSource

Throw an exception if null pointer passed, or return it casted to right type.