Skip to content

Exceptions

c4.exceptions.C4Exception

Bases: Exception

Base exception class for all C4-related errors.

c4.exceptions.PlantUMLError

Bases: C4Exception

Base exception class for all PlantUML-related errors.

c4.exceptions.PlantUMLRenderingError

Bases: PlantUMLError

Error raised when rendering fails.

c4.exceptions.PlantUMLRemoteRenderingError

Bases: PlantUMLRenderingError

Error raised when rendering via a remote PlantUML server fails.

c4.exceptions.PlantUMLLocalRenderingError

Bases: PlantUMLRenderingError

Error raised when rendering via a local PlantUML backend fails.

c4.exceptions.PlantUMLBackendConfigurationError

Bases: PlantUMLError

Error raised when a PlantUML backend is incorrectly configured.

c4.exceptions.MermaidError

Bases: C4Exception

Base exception class for all Mermaid-related errors.

c4.exceptions.MermaidRenderingError

Bases: MermaidError

Error raised when rendering fails.

c4.exceptions.MermaidBackendConfigurationError

Bases: MermaidError

Error raised when a Mermaid backend is incorrectly configured.

c4.exceptions.MermaidLocalRenderingError

Bases: MermaidError

Error raised when rendering via a local Mermaid backend fails.

Converter Exceptions

c4.converters.exceptions.ConversionError

Bases: Exception

Base exception for all diagram conversion errors.

c4.converters.exceptions.DiagramJSONSchemaParsingError

Bases: ConversionError

Raised when a JSON diagram cannot be parsed.

c4.converters.exceptions.DiagramJSONSchemaValidationError

Bases: ConversionError

Raised when a JSON diagram does not match the expected schema.

c4.converters.exceptions.ElementResolutionError

Bases: ConversionError

Raised when an element cannot be resolved by alias or label.

c4.converters.exceptions.ElementResolutionConflictError

Bases: ConversionError

Raised when a label matches multiple elements and resolution is ambiguous.