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

Added new exception class to reveal more information to the user. Fix… #35

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

bschroeter
Copy link
Collaborator

@bschroeter bschroeter commented Oct 17, 2024

As per discussions, a new class with the default behaviour to show more information to the user about the failed underlying shell command.

Added tests and fixed a small omission on the shell call itself.

Error message syntax can be changed, but for now it is:

Error $CODE: $STDERR\n

Which is pretty similar to the default, just with more information.

Programmatically, if a user is running into a situation where they are causing exceptions, their code should be made to be robust and handle these exceptions. HPCpy is doing what it should and communicating the error through Exceptions, rather than trying to handle them itself, which is going to be a massive can of worms as different HPC platforms have different setups... (i.e. some may not require a queue or project directive at all, where others do, even if there is only one possible option).

@bschroeter bschroeter linked an issue Oct 17, 2024 that may be closed by this pull request
@bschroeter
Copy link
Collaborator Author

OK, it seems that the Actions runner has a different syntax for error messages, will fix and ship it back shortly.

Copy link
Contributor

@SeanBryan51 SeanBryan51 left a comment

Choose a reason for hiding this comment

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

I've added some corrections to doc strings (as PR suggestions) but other than it looks good, thanks!

hpcpy/utilities.py Outdated Show resolved Hide resolved
hpcpy/client/base.py Outdated Show resolved Hide resolved
bschroeter and others added 2 commits October 17, 2024 11:49
Co-authored-by: Sean Bryan <[email protected]>
Co-authored-by: Sean Bryan <[email protected]>
@bschroeter bschroeter merged commit 635f1a8 into main Oct 17, 2024
2 of 3 checks passed
@bschroeter bschroeter deleted the 34-pbs-scheduler-errors-are-not-output-to-the-user branch October 17, 2024 04:39
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.

PBS scheduler errors are not output to the user
2 participants