Source code for pyoperant.errors

# useful exception for going into sleep
[docs]class GoodNite(Exception): """ exception for when the lights should be off """ pass
[docs]class EndSession(Exception): """ exception for when a session should terminate """ pass
[docs]class EndBlock(Exception): """ exception for when a block should terminate """ pass
## defining Error classes for operant HW control
[docs]class Error(Exception): '''base class for exceptions in this module''' pass
[docs]class InterfaceError(Exception): '''raised for errors with an interface. this should indicate a software error, like difficulty connecting to an interface ''' pass
[docs]class ComponentError(Exception): '''raised for errors with a component. this should indicate a hardware error in the physical world, like a problem with a feeder. this should be raised by components when doing any internal validation that they are working properly ''' pass