15. API - Exceptions

The exc module defines the various exception classes specific to picraft.


All items in this module are available from the picraft namespace without having to import picraft.exc directly.

The following items are defined in the module:

15.1. Exceptions

exception picraft.exc.Error[source]

Base class for all PiCraft exceptions

exception picraft.exc.NotSupported[source]

Exception raised for unimplemented methods / properties

exception picraft.exc.ConnectionError[source]

Base class for PiCraft errors relating to network communications

exception picraft.exc.ConnectionClosed[source]

Exception raised when an operation is attempted against a closed connection

exception picraft.exc.CommandError[source]

Exception raised when a network command fails

exception picraft.exc.NoResponse[source]

Exception raised when a network command expects a response but gets none

exception picraft.exc.BatchStarted[source]

Exception raised when a batch is started before a prior one is complete

exception picraft.exc.BatchNotStarted[source]

Exception raised when a batch is terminated when none has been started

15.2. Warnings

exception picraft.exc.EmptySliceWarning[source]

Warning raised when a zero-length vector slice is passed to blocks

exception picraft.exc.NoHandlersWarning[source]

Warning raised when a class with no handlers is registered with has_handlers()

exception picraft.exc.ParseWarning[source]

Base class for warnings encountered during parsing

exception picraft.exc.UnsupportedCommand[source]

Warning raised when an unsupported statement is encountered

exception picraft.exc.NegativeWeight[source]

Warning raised when a negative weight is encountered