gds_fdtd.errors

gds_fdtd simulation toolbox.

Exception hierarchy. Every gds_fdtd-raised error derives from GdsFdtdError so applications can catch the whole package with one except-clause — while each subclass ALSO derives from the builtin type the code historically raised (ValueError, RuntimeError, …), so no existing caller breaks.

The CLI maps this hierarchy onto exit codes: JobValidationError -> 2 · SolverUnavailableError -> 3 · BudgetExceededError -> 4 · anything else -> 1.

Exceptions

BudgetExceededError

A spending limit (Budget) refused the operation before any cost.

GdsFdtdError

Base class for every error gds_fdtd raises intentionally.

JobValidationError

A simulation job failed validate() — fix the job, don't retry.

LayoutError

A layout could not be loaded or interpreted (missing cell, ports, ...).

MaterialSourceError

A material has no usable optical-constant source for the target engine (or an explicit source: was requested that the material does not define).

SMatrixError

An S-matrix is malformed or was used inconsistently (bad shapes, unknown port/mode, mixed frequency grids, unsupported export).

SolverError

An engine adapter failed at run/build time.

SolverUnavailableError

The requested engine is not usable here (not installed, no license).

TechnologyError

A technology file/model is invalid (bad layer stack, material, ...).