Exceptions
| Category | Exception | Raised if | Details provided |
|---|---|---|---|
| AST construction | Invalid AST | The input cannot be parsed as a valid AST according to the spec | - Unrecognized byte strings / text - Invalid links between nodes |
| AST construction | AST size exceeded | The input exceeds the maximum allowed bit-length | - Input size vs limit |
| AST construction | Nest depth exceeded | The input contains nested control flow statements which exceed the max allowed depth | - Root node location - Depth reached vs limit |
| AST construction | Unable to parse literal? | The input contains a literal that cannot be parsed as its corresponding type (only an issue for textual input?) | - Literal location, value and type |
| Backend conflict | Invalid port | The port has been used that is not part of the backend's valid ports | - Invalid port ID - List of valid port IDs |
| Backend conflict | Frequency out of bounds | A modulated instruction has a frequency that is out of bounds for the specified channel (frame + detuning) | - Total frequency (frame, detuning) - Allowed limits |
| Backend conflict | Frame frequency bandwidth exceeded | The set of frequencies of modulated instructions played on a port exceed the allowed bandwidths specified by the backend | - Frequencies and implied bandwidth - Allowed bandwidths for the specified port |
| Backend conflict | Amplitude exceeded | The combination of pulses played at a certain point exceed the maximum amplitude on that port allowed by the backend | - Contributing instructions - Combined amplitude - Amplitude limits |
| Backend conflict | Filter limit exceeded | The maximum number of IIR/FIR filters allowed on a port has been exceeded | - Filter type & count - Backend limits |
| Backend conflict | Failed to resolve instruction timing | The backend failed to find an explicit timing for the played instructions and specified alignments | - Contributing instructions |
| Backend conflict | Unsupported instruction | An instruction is played on a port (or globally) that is not supported by the backend | - Invalid instruction - Allowed instructions on the specified port (if not global) |
| Backend conflict | Max job duration exceeded | The overall duration of the job exceeds the backend's limit | - Calculated duration vs limit |
| Backend conflict | Sample rate not supported | The sample rate of a numerical waveform doesn't match the ports sample rate | - Instruction sample rate vs port sample rate constraints |
| Backend conflict | Unsupported feature | A feature of the backend is utilized in the program but not supported by the backend (e.g. branching) | - Invalid operation |