Exceptions¶
All public exceptions raised by Fhircraft, organized by component.
exceptions ¶
Fhircraft Exceptions Module
This module provides a unified public API for all exceptions in fhircraft. All exceptions inherit from FhircraftException and are organized by component.
Classes:
| Name | Description |
|---|---|
FhircraftException |
Base exception for all fhircraft errors. |
FhircraftWarning |
Base warning for all fhircraft warnings. |
MapperException |
Base exception for all FHIR Mapper errors. |
MapperWarning |
Warning raised for non-critical issues encountered during mapping operations. |
MapperLexingError |
Raised when FHIR Mapping Language parsing fails. |
MapperParsingError |
Raised when FHIR Mapping Language syntax or parsing fails. |
MapperValidationError |
Raised when input data validation fails. |
MapperScopeError |
Raised when something accessing or modifying the mapping scope fails. |
MapperDigestionError |
Raised during the digestion of StructureMap definitions. |
MapperGroupProcessingError |
Raised when group processing fails. |
MapperRuleProcessingError |
Raised when rule processing fails. |
MapperSourceProcessingError |
Raised when source/input processing fails. |
MapperTargetProcessingError |
Raised when target/output processing fails. |
MapperExecutionError |
Raised when mapping execution fails. |
MapperRegistryNotFoundError |
Raised when a required StructureMap cannot be resolved. |
FHIRPathException |
Base exception for all FHIRPath errors. |
FHIRPathParsingError |
Exception raised for errors encountered during the parsing of FHIRPath expressions. |
FHIRPathLexingError |
Exception raised for errors encountered during the lexical analysis of FHIRPath expressions. |
FHIRPathRuntimeError |
Exception raised for errors that occur during the runtime evaluation of FHIRPath expressions. |
FHIRPathTypeError |
Exception raised when there are type mismatches during FHIRPath expression evaluation. |
FHIRPathOperationError |
Exception raised when an unsupported or invalid operation is encountered during FHIRPath evaluation. |
FHIRPathWarning |
Warning raised for non-critical issues encountered during FHIRPath expression processing. |
FhirValidationWarning |
Warning raised for non-critical issues encountered during FHIR resource validation. |
FhirTypeError |
Raised when type checking or conversion fails. |
DefinitionNotFoundError |
Raised when a required structure definition cannot be resolved. |
FactoryException |
Base exception for all Factory component errors. |
FactoryDefinitionIndexError |
Raised when a DefinitionIndex navigation or construction operation fails. |
FactoryDefinitionResolutionError |
Raised when a SnapshotResolver or DefinitionIndex operation fails. |
FactoryBuilderError |
Raised when a Builder operation fails. |
FactoryTypeResolutionError |
Raised when resolving a FHIR type fails. |
FactoryAssemblerError |
Raised when the assembler encounters an error. |
FactoryWarning |
Warning raised for non-critical issues encountered during factory operations. |
PackageException |
Base exception for all Package Registry errors. |
PackageNotFoundError |
Raised when a package is not found in the registry. |
PackageResolutionError |
Raised when package resolution or loading fails. |
PackageValidationError |
Raised when package validation fails. |
PackageValidationWarning |
Warning raised for non-critical issues encountered during package validation. |
FhircraftException
Path: fhircraft.exceptions.FhircraftException
Bases: Exception
Base exception for all fhircraft errors.
All exceptions in fhircraft inherit from this class, allowing users to catch any fhircraft-related error with a single except clause.
Attributes:
| Name | Type | Description |
|---|---|---|
message |
Human-readable error message |
|
component |
Optional component identifier (e.g., 'mapper', 'path', 'factory') |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Detailed error message describing what went wrong |
required |
component
|
Optional[str]
|
Optional identifier for which component raised the error |
None
|
FhircraftWarning
Path: fhircraft.exceptions.FhircraftWarning
Bases: Warning
Base warning for all fhircraft warnings.
This can be used to signal non-critical issues or potential problems without raising an exception.
MapperWarning
Path: fhircraft.exceptions.MapperWarning
Bases: FhircraftWarning
Warning raised for non-critical issues encountered during mapping operations.
FHIRPathParsingError
Path: fhircraft.exceptions.FHIRPathParsingError
Bases: FHIRPathException
Exception raised for errors encountered during the parsing of FHIRPath expressions.
This error is typically thrown when the FHIRPath parser encounters invalid syntax or cannot interpret a given FHIRPath expression.
FHIRPathLexingError
Path: fhircraft.exceptions.FHIRPathLexingError
Bases: FHIRPathException
Exception raised for errors encountered during the lexical analysis of FHIRPath expressions.
This error is typically thrown when the FHIRPath lexer encounters invalid tokens or cannot interpret a given FHIRPath expression.
FHIRPathRuntimeError
Path: fhircraft.exceptions.FHIRPathRuntimeError
Bases: FHIRPathException, RuntimeError
Exception raised for errors that occur during the runtime evaluation of FHIRPath expressions.
This exception is intended to signal issues encountered while processing or executing FHIRPath logic, such as invalid operations, type mismatches, or other runtime-specific problems.
FHIRPathTypeError
Path: fhircraft.exceptions.FHIRPathTypeError
Bases: FHIRPathException
Exception raised when there are type mismatches during FHIRPath expression evaluation.
This typically occurs when attempting incompatible operations on values of different types.
FHIRPathOperationError
Path: fhircraft.exceptions.FHIRPathOperationError
Bases: FHIRPathException
Exception raised when an unsupported or invalid operation is encountered during FHIRPath evaluation.
This can occur when trying to call functions that don't exist or with incompatible arguments.
FHIRPathWarning
Path: fhircraft.exceptions.FHIRPathWarning
Bases: FhircraftWarning
Warning raised for non-critical issues encountered during FHIRPath expression processing.
This warning can be used to alert users to potential problems or unexpected behavior that do not necessarily prevent the execution of FHIRPath operations.
FhirValidationWarning
Path: fhircraft.exceptions.FhirValidationWarning
Bases: FhircraftWarning
Warning raised for non-critical issues encountered during FHIR resource validation.
DefinitionNotFoundError
Path: fhircraft.exceptions.DefinitionNotFoundError
Bases: FhircraftException, FileNotFoundError
Raised when a required structure definition cannot be resolved.
FactoryWarning
Path: fhircraft.exceptions.FactoryWarning
Bases: FhircraftWarning
Warning raised for non-critical issues encountered during factory operations.
PackageValidationWarning
Path: fhircraft.exceptions.PackageValidationWarning
Bases: FhircraftWarning
Warning raised for non-critical issues encountered during package validation.