Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Display exception cause if possible #1769

Merged
merged 2 commits into from
Jan 17, 2020
Merged

Display exception cause if possible #1769

merged 2 commits into from
Jan 17, 2020

Conversation

tibcoplord
Copy link
Contributor

@tibcoplord tibcoplord commented Dec 12, 2019

@codecov
Copy link

codecov bot commented Dec 12, 2019

Codecov Report

Merging #1769 into master will increase coverage by <.01%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master    #1769      +/-   ##
============================================
+ Coverage     35.41%   35.41%   +<.01%     
  Complexity     1173     1173              
============================================
  Files           191      191              
  Lines         10950    10952       +2     
  Branches       1776     1778       +2     
============================================
+ Hits           3878     3879       +1     
  Misses         6608     6608              
- Partials        464      465       +1

@rohanKanojia rohanKanojia added the pr/changelog-entry-please Please add a changelog entry for this PR label Dec 12, 2019
@@ -296,7 +296,11 @@ protected void buildAndTag(ServiceHub hub, ImageConfiguration imageConfig)
fabric8ServiceHub.getBuildService().build(imageConfig);

} catch (Exception ex) {
throw new MojoExecutionException("Failed to execute the build: " + ex);
if (ex.getCause() != null) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: more readable one-liner:

throw new MojoExecutionException("Failed to execute the build: " + 
Optional.ofNullable(ex.getCause()).orElse(ex));

@rohanKanojia
Copy link
Member

@plord12 : Could you please add a line to CHANGELOG.md regarding this change?

@tibcoplord
Copy link
Contributor Author

@plord12 : Could you please add a line to CHANGELOG.md regarding this change?

I tried but github wouldn't create the pull request.

@rohanKanojia rohanKanojia removed the pr/changelog-entry-please Please add a changelog entry for this PR label Dec 16, 2019
@rohanKanojia
Copy link
Member

@manusa : Shall we merge this too?

@manusa
Copy link
Member

manusa commented Jan 14, 2020

@rohanKanojia Yep, sorry my mailbox got flooded (again) and this one got lost

@rohanKanojia rohanKanojia merged commit d6a7010 into fabric8io:master Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants