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 CommandIOException #812

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mpickering
Copy link
Contributor

This introduces a structured exception for the result of running an
external process. By using a structured type, the build system can catch
these exceptions and control how they are displayed to the user rather
than relying on the default shake formatting.

Copy link
Owner

@ndmitchell ndmitchell left a comment

Choose a reason for hiding this comment

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

Thanks - shove some docs on and I'll merge!

liftIO $ throwIO $ CommandIOException funcName optRealCommand optUserCommand
cwd exit captured exceptionBuffer

data CommandIOException =
Copy link
Owner

Choose a reason for hiding this comment

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

If we're going to export this, it ends up being part of the API, so can it have some documentation comments added to it - saying it comes from commands

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the documentation now.

This introduces a structured exception for the result of running an
external process. By using a structured type, the build system can catch
these exceptions and control how they are displayed to the user rather
than relying on the default shake formatting.
@mpickering mpickering force-pushed the wip/structured-commandioerror branch from 38c0570 to f038fbe Compare March 2, 2022 11:41
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