-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Generic handling of Git exit codes, errors and warnings #6527
Labels
Comments
Any thoughts on how this would look like? |
With the display of git errors, #7607 wouldn't have failed silently. |
This was referenced Feb 21, 2020
A little more info in #8735 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behaviour
The exit code of Git as well as errors and warnings printed to the console by Git are not checked by every GE function.
Expected behaviour
Git command errors are not silently ignored but handled correctly.
Git warnings and errors are displayed clearly, not only as an unhandled exception.
GitCommand
shall check the Git exit code and throw aGitFailException
unless the calling function indicates that it will handle the exit code itself. TheException.Message
shall contain all Git error messages ("error: ...", "fatal: ...") and all Git warning messages ("warning: ...").A
GitErrorException
shall be thrown with all Git error and warning messages as theException.Message
. These exceptions shall be caught by the calling function or form if applicable and as a fallback byGitModuleForm
/GitModuleControl
, which shall display the error message in a MessageBox.GitCommand
shall check for Git warning messages and display them in a MessageBox unless the calling function indicates that it will handle them itself.Though I am not sure whether a MessageBox is really feasible in async and background tasks. If not, a
GitWarningException
should be thrown with all Git warning messages as theException.Message
. The drawback of this exception would be that all functions which don't handle the warnings themselves would be canceled.Git errors and warnings shall be logged in the
GitCommandLog
.Environment
The text was updated successfully, but these errors were encountered: