fix: preserve teardown error detail via TeardownError exception by lesnik512 · Pull Request #82 · modern-python/lite-bootstrap · GitHub
Skip to content

fix: preserve teardown error detail via TeardownError exception#82

Merged
lesnik512 merged 1 commit into
mainfrom
fix/teardown-error-detail
May 2, 2026
Merged

fix: preserve teardown error detail via TeardownError exception#82
lesnik512 merged 1 commit into
mainfrom
fix/teardown-error-detail

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Add lite_bootstrap.exceptions module with LiteBootstrapError(RuntimeError) base and BootstrapperNotReadyError, ConfigurationError, TeardownError subclasses. TeardownError aggregates every (instrument_name, exception) pair into both the message string and a public .errors attribute, so detail survives even when LoggingInstrument tears down before later instrument failures are logged. All four prior RuntimeError raise sites in the package migrate to the new tree; subclassing RuntimeError keeps existing except RuntimeError: callers working.

Add lite_bootstrap.exceptions module with LiteBootstrapError(RuntimeError)
base and BootstrapperNotReadyError, ConfigurationError, TeardownError
subclasses. TeardownError aggregates every (instrument_name, exception)
pair into both the message string and a public .errors attribute, so
detail survives even when LoggingInstrument tears down before later
instrument failures are logged. All four prior RuntimeError raise sites
in the package migrate to the new tree; subclassing RuntimeError keeps
existing `except RuntimeError:` callers working.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@lesnik512 lesnik512 self-assigned this May 2, 2026
@codecov

codecov Bot commented May 2, 2026

Copy link
Copy Markdown

@lesnik512 lesnik512 merged commit 7d61c89 into main May 2, 2026
8 checks passed
@lesnik512 lesnik512 deleted the fix/teardown-error-detail branch May 2, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant