Skip to content

🔥 errors

errors

The errors module contains exceptions raised by the Soir engine to signal errors at runtime.

InLoopException

Bases: SoirException

Raised when trying to execute code inside a live context.

In Soir, some of the code is expected to be used from the global scope as it affects everything, for example, setting the BPM. This exception is raised if such code is called from a loop.

NotInLoopException

Bases: SoirException

Raised when trying to execute code outside of a live context.

In Soir, some of the code is expected to be used from within a loop or a live function, for instance sleeping between two instructions. This exception is raised if such code is called from the global scope.

SoirException

Bases: Exception

Base class for Soir exceptions.

UnknownMidiTrackException

Bases: SoirException

Raised when trying to use an invalid MIDI track.

In Soir, MIDI tracks are used to send MIDI events to the external synthesizer. This exception is raised if an invalid MIDI track is used.