Copyright | (c) Jost Berthold 2010-2015 |
---|---|
License | BSD3 |
Maintainer | jost.berthold@gmail.com |
Stability | experimental |
Portability | no (depends on GHC internals) |
Safe Haskell | None |
Language | Haskell2010 |
Exception type for packman library, using magic constants #include'd from a C header file shared with the foreign primitive operation code.
PackException
s can occur at Haskell level or in the foreign primop.
All Haskell-level exceptions are cases of invalid data when reading
and deserialising Serialised
data:
P_BinaryMismatch
: serialised data were produced by a different executable (must be the same binary).P_TypeMismatch
: serialised data have the wrong typeP_ParseError
: serialised data could not be parsed (from binary or text format)
The exceptions caused by the foreign primops (return codes)
indicate errors at the C level. Most of them can occur when
serialising data; the exception is P_GARBLED
which indicates that
serialised data is garbled.
Documentation
data PackException Source #
Packing exception codes, matching error codes implemented in the runtime system or describing errors which can occur within Haskell.
P_SUCCESS | no error, ==0. Internal code, should never be seen by users. |
P_BLACKHOLE | RTS: packing hit a blackhole. Used internally, not passed to users. |
P_NOBUFFER | RTS: buffer too small |
P_CANNOTPACK | RTS: contains closure which cannot be packed (MVar, TVar) |
P_UNSUPPORTED | RTS: contains unsupported closure type (implementation missing) |
P_IMPOSSIBLE | RTS: impossible case (stack frame, message,...RTS bug!) |
P_GARBLED | RTS: corrupted data for deserialisation |
P_ParseError | Haskell: Packet data could not be parsed |
P_BinaryMismatch | Haskell: Executable binaries do not match |
P_TypeMismatch | Haskell: Packet data encodes unexpected type |
decodeEx :: Int# -> PackException Source #
decodes an Int#
to a
. Magic constants are read
from file cbits/Errors.h.PackException