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

Report failure if file isn't successfully written #150

Open
pshriwise opened this issue Sep 7, 2023 · 2 comments
Open

Report failure if file isn't successfully written #150

pshriwise opened this issue Sep 7, 2023 · 2 comments

Comments

@pshriwise
Copy link
Member

We've seen a couple of cases on OSX where the working directory of the Cubit application is / or some other location that isn't writeable for the user. In this case the plugin will either cause Cubit to crash or finish without writing the file, neither of which are desirable behavior if we fail to write the DAGMC file.

@MicahGale
Copy link

This error should occur ASAP IMO. A helpful error message and crash after a long execution is barely more useful than no error message at all. As soon as the file location is known something simulating touch should be done to verify write permissions.

@pshriwise
Copy link
Member Author

Agreed. I'm betting there's a convention for handling this within Cubit either by detecting permissions of the output directory through the OS or writing a test file as you suggested.

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

No branches or pull requests

2 participants