Raise more informative ROBOT error#37
Merged
Merged
Conversation
Member
|
thanks! |
|
@bgyori Much appreciated! |
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.
I've often been confused by the error shown if Robot conversion fails since it doesn't show the actual output from Robot so the reason for the error is unclear:
There are two challenges: subprocess.CalledProcessError doesn't surface the output by default and the output can be very long which if fully displayed would be disruptive. So this PR adds a custom RobotError class which is raised instead of subprocess.CalledProcessError and creates a nicer and easier-to-customize output:
by default showing up to 500 characters of the actual Robot error.
Fixes #10 though taking a different approach to the one suggested there.