grass.script: Add more parameters to handle_errors#5875
Merged
wenzeslaus merged 7 commits intoOSGeo:mainfrom Jun 24, 2025
Merged
grass.script: Add more parameters to handle_errors#5875wenzeslaus merged 7 commits intoOSGeo:mainfrom
wenzeslaus merged 7 commits intoOSGeo:mainfrom
Conversation
This add handler, stderr, and env to gs.handle_errors. This allows construction of better exception message and calling g.message with gs.fatal. Otherwise, it follows the same rules as error passed with the explicit kwargs dict parameter. Using stderr and handler to reduce confusion. errors is name of the type of handling in gs.handle_errors, but also the error messages in CalledModuleError.
Member
|
Is it possible that the new test file isn't run, as the file name doesn't start with |
Member
Yep, the test wasn't in the list of tests passed or failed. Also, some conflicts in the docstrings to handle |
…nds.py to be collected as fails on Windows
echoix
approved these changes
Jun 22, 2025
Member
echoix
left a comment
There was a problem hiding this comment.
This one is now ready to go. I have seen the test fail, then passed once fixed.
Member
|
@wenzeslaus I’m letting you write the commit message and merge |
Member
Author
|
I just hit the need for this yesterday when working on tests - I got the "g.message not found" message. |
This was referenced Jun 24, 2025
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This add handler, stderr, and env to gs.handle_errors. This allows construction of better exception message and calling g.message with gs.fatal. Otherwise, it follows the same rules as error passed with the explicit kwargs dict parameter. Using stderr and handler to reduce confusion. errors is name of the type of handling in gs.handle_errors, but also the error messages in CalledModuleError.