-
Notifications
You must be signed in to change notification settings - Fork 27
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
include stderr and stdout in CommandExecutionException #816
Conversation
src/main/java/com/google/cloud/tools/managedcloudsdk/command/CommandExecutionException.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/cloud/tools/managedcloudsdk/command/CommandCaller.java
Show resolved
Hide resolved
} catch (InterruptedException | ExecutionException ignored) { | ||
stdErr = "stderr collection interrupted"; | ||
} | ||
throw new CommandExecutionException(stdOut + "\n" + stdErr, ex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in CommandExitException, error is stored in a separate field instead of the actual message
field of the exception. I feel that's cleaner. I'd also suggest that stdout and stderr be kept in 2 different fields and let the caller render it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Codecov Report
@@ Coverage Diff @@
## master #816 +/- ##
============================================
- Coverage 77.13% 77.12% -0.01%
- Complexity 617 618 +1
============================================
Files 98 98
Lines 2449 2457 +8
Branches 325 325
============================================
+ Hits 1889 1895 +6
- Misses 412 414 +2
Partials 148 148
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this worth proceeding with or should we close it as WAI?
I think it's fine... will review when I get a chance. @saturnism @chanseokoh any comments? |
Nothing much from my side besides this minor Javadoc comment: #816 (comment) |
Codecov Report
@@ Coverage Diff @@
## master #816 +/- ##
============================================
+ Coverage 78.35% 78.47% +0.11%
- Complexity 608 612 +4
============================================
Files 97 97
Lines 2398 2411 +13
Branches 282 282
============================================
+ Hits 1879 1892 +13
Misses 411 411
Partials 108 108
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping
* include stderr and stdout in CommandExecutionException * update JavaDoc * add getErrorLog method
@loosebazooka @saturnism
See #991