ekg-lib

exceptions

Common exception types and error utilities shared across ekg_lib.

Centralizing these exceptions helps keep error handling consistent between components.

Exception Classes

Base Exception

Specific Exceptions

Usage

from ekg_lib.exceptions import Error, CannotCapture, PagingNotSupported

# Raise custom exceptions
if not can_capture:
    raise CannotCapture("Unable to capture data from source")

# Catch ekg_lib exceptions
try:
    # some operation
    pass
except Error as e:
    print(f"ekg_lib error: {e}")