Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce mill.api.MillException to transport the error condition #2789

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

lefou
Copy link
Member

@lefou lefou commented Sep 27, 2023

I needed this in various situations, so I created this PR as a base for other PRs. It's ok to keep this unmerged until we need it.

Not all build inconsistencies can't be detected before we start evaluation and not all can be reported as evaluation errors, hence this PR add an additional way to exit Mill with a proper error message. You can throw a mill.api.MillException. It will be handled in MillMain as well as MillClientMain, our central entry points to Mill. The error message will be reported to the user and Mill exits with code 1. No stack trace will be shown.

Pull request: #2789

@lefou lefou changed the title Introduce a MillException to transport the error condition Introduce mill.api.MillException to transport the error condition Sep 27, 2023
@lefou lefou marked this pull request as ready for review September 27, 2023 18:07
@lefou lefou merged commit f511656 into main Sep 27, 2023
37 checks passed
@lefou lefou deleted the millexception branch September 27, 2023 18:08
@lefou lefou added this to the 0.11.5 milestone Sep 27, 2023
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.

None yet

1 participant