Skip to content

Commit

Permalink
coredevice/exceptions: PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
sbourdeauducq committed Dec 22, 2015
1 parent 23355d8 commit f652292
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions artiq/coredevice/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
from artiq.language.core import ARTIQException


class ZeroDivisionError(ARTIQException):
"""Python's :class:`ZeroDivisionError`, mirrored in ARTIQ."""


class ValueError(ARTIQException):
"""Python's :class:`ValueError`, mirrored in ARTIQ."""


class IndexError(ARTIQException):
"""Python's :class:`IndexError`, mirrored in ARTIQ."""


class InternalError(ARTIQException):
"""Raised when the runtime encounters an internal error condition."""


class RTIOUnderflow(ARTIQException):
"""Raised when the CPU fails to submit a RTIO event early enough
(with respect to the event's timestamp).
The offending event is discarded and the RTIO core keeps operating.
"""


class RTIOSequenceError(ARTIQException):
"""Raised when an event is submitted on a given channel with a timestamp
not larger than the previous one.
The offending event is discarded and the RTIO core keeps operating.
"""


class RTIOCollisionError(ARTIQException):
"""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.
@@ -37,6 +44,7 @@ class RTIOCollisionError(ARTIQException):
The offending event is discarded and the RTIO core keeps operating.
"""


class RTIOOverflow(ARTIQException):
"""Raised when at least one event could not be registered into the RTIO
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.
"""


class DDSBatchError(ARTIQException):
"""Raised when attempting to start a DDS batch while already in a batch,
or when too many commands are batched.

0 comments on commit f652292

Please sign in to comment.