# `simpy.exceptions` — Exception types used by SimPy

SimPy specific exeptions.

exception simpy.exceptions.SimPyException

  Base class for all SimPy specific exceptions.

exception simpy.exceptions.Interrupt(cause)

  Exception thrown into a process if it is interrupted (see `interrupt()`).

  `cause` provides the reason for the interrupt, if any.

  If a process is interrupted concurrently, all interrupts will be thrown into the process in the same order as they occurred.

  property cause

    The cause of the interrupt or `None` if no cause was provided.

exception simpy.exceptions.StopProcess(value)

  Raised to stop a SimPy process (similar to `StopIteration`).

  In Python 2, a `return value` inside generator functions is not allowed. The fall-back was raising `StopIteration(value)` instead. However, this is deprecated now, so we need a custom exception type for this.

  property value

    The process’ return value.