forked from M-Labs/artiq
1
0
Fork 0

coredevice/exceptions: PEP8

This commit is contained in:
Sebastien Bourdeauducq 2015-12-22 12:03:11 +08:00
parent 23355d8eff
commit f6522922f8
1 changed files with 9 additions and 0 deletions

View File

@ -1,17 +1,22 @@
from artiq.language.core import ARTIQException from artiq.language.core import ARTIQException
class ZeroDivisionError(ARTIQException): class ZeroDivisionError(ARTIQException):
"""Python's :class:`ZeroDivisionError`, mirrored in ARTIQ.""" """Python's :class:`ZeroDivisionError`, mirrored in ARTIQ."""
class ValueError(ARTIQException): class ValueError(ARTIQException):
"""Python's :class:`ValueError`, mirrored in ARTIQ.""" """Python's :class:`ValueError`, mirrored in ARTIQ."""
class IndexError(ARTIQException): class IndexError(ARTIQException):
"""Python's :class:`IndexError`, mirrored in ARTIQ.""" """Python's :class:`IndexError`, mirrored in ARTIQ."""
class InternalError(ARTIQException): class InternalError(ARTIQException):
"""Raised when the runtime encounters an internal error condition.""" """Raised when the runtime encounters an internal error condition."""
class RTIOUnderflow(ARTIQException): class RTIOUnderflow(ARTIQException):
"""Raised when the CPU fails to submit a RTIO event early enough """Raised when the CPU fails to submit a RTIO event early enough
(with respect to the event's timestamp). (with respect to the event's timestamp).
@ -19,6 +24,7 @@ class RTIOUnderflow(ARTIQException):
The offending event is discarded and the RTIO core keeps operating. The offending event is discarded and the RTIO core keeps operating.
""" """
class RTIOSequenceError(ARTIQException): class RTIOSequenceError(ARTIQException):
"""Raised when an event is submitted on a given channel with a timestamp """Raised when an event is submitted on a given channel with a timestamp
not larger than the previous one. not larger than the previous one.
@ -26,6 +32,7 @@ class RTIOSequenceError(ARTIQException):
The offending event is discarded and the RTIO core keeps operating. The offending event is discarded and the RTIO core keeps operating.
""" """
class RTIOCollisionError(ARTIQException): class RTIOCollisionError(ARTIQException):
"""Raised when an event is submitted on a given channel with the same """Raised when an event is submitted on a given channel with the same
coarse timestamp as the previous one but with a different fine timestamp. coarse timestamp as the previous one but with a different fine timestamp.
@ -37,6 +44,7 @@ class RTIOCollisionError(ARTIQException):
The offending event is discarded and the RTIO core keeps operating. The offending event is discarded and the RTIO core keeps operating.
""" """
class RTIOOverflow(ARTIQException): class RTIOOverflow(ARTIQException):
"""Raised when at least one event could not be registered into the RTIO """Raised when at least one event could not be registered into the RTIO
input FIFO because it was full (CPU not reading fast enough). input FIFO because it was full (CPU not reading fast enough).
@ -46,6 +54,7 @@ class RTIOOverflow(ARTIQException):
the exception is caught, and events will be partially retrieved. the exception is caught, and events will be partially retrieved.
""" """
class DDSBatchError(ARTIQException): class DDSBatchError(ARTIQException):
"""Raised when attempting to start a DDS batch while already in a batch, """Raised when attempting to start a DDS batch while already in a batch,
or when too many commands are batched. or when too many commands are batched.