Skip to content

Commit

Permalink
Add IOException message to RuntimeException if sending message fails
Browse files Browse the repository at this point in the history
  • Loading branch information
juhasipo committed Feb 17, 2017
1 parent 0cddb2e commit 802d5c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Changelog
1.3.1
-----

* Show exception message in GoCD plugin error message if sending message to Slack fails

1.3
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected GoPluginApiResponse handleTaskExecution(GoPluginApiRequest request) {

slackExecutorFactory.forDestination(destination).sendMessage(message);
} catch (IOException e) {
throw new RuntimeException("Could not send message to slack", e);
throw new RuntimeException("Could not send message to slack: " + e.getMessage(), e);
}

Map<String, Object> result = new HashMap<>();
Expand Down

0 comments on commit 802d5c2

Please sign in to comment.