Skip to content

Expose EmptyFileError and ReachMaximumTriesError in the public API#351

Open
elvis-aguero wants to merge 1 commit into
bessagroup:mainfrom
elvis-aguero:expose-io-exceptions
Open

Expose EmptyFileError and ReachMaximumTriesError in the public API#351
elvis-aguero wants to merge 1 commit into
bessagroup:mainfrom
elvis-aguero:expose-io-exceptions

Conversation

@elvis-aguero

Copy link
Copy Markdown

EmptyFileError and ReachMaximumTriesError are raised by public methods
(ExperimentData.from_file and the domain/data loading paths), but they can
only be imported from f3dasm._src.errors. Code that uses the public API
cannot catch what that API throws without reaching into the private _src
module.

This re-exports both at the top level, the same way the other user-facing
classes are exposed:

from f3dasm import EmptyFileError, ReachMaximumTriesError

Re-export only. No behavior change and no new dependencies.

These two exceptions are raised by public methods (ExperimentData.from_file
and the domain/data loading paths) but are only importable from
f3dasm._src.errors. Callers cannot catch what the public API throws without
reaching into the private _src module.

Re-export them at the top level, matching how the other user-facing classes
are exposed. Re-export only, no behavior change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes two exceptions that are raised from user-facing code paths importable from the top-level f3dasm package, so downstream users can catch them without importing from the private f3dasm._src package.

Changes:

  • Re-export EmptyFileError and ReachMaximumTriesError from f3dasm.__init__.
  • Add both symbols to __all__ so wildcard imports include them.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants