gpedro / slack-webhook

Slack WebHook Integration for Java
MIT License
182 stars 54 forks source link

throw subclass of RuntimeException if send fails #16

Closed jgangemi closed 8 years ago

jgangemi commented 8 years ago

could you please throw a subclass of RuntimeException in the event a message fails to send? doing this makes it very difficult to distinguish between other RuntimeExceptions that may have been thrown in a larger block of code.

thanks!!

thesmith commented 8 years ago

Hey, maybe you could provide a PR to show what you're looking for? Providing unchecked wraps for all the checked exceptions isn't great.

TBH I'd rather just re-write the whole API code to use the Jersey 2 client. What's currently there is pretty nasty.

jgangemi commented 8 years ago

i like that the library is lean on dependencies, using jersey would pull in a lot of extras.

jodd (http://jodd.org/) is pretty lightweight and offers http and json functionality that you could use and keep dependencies light and small.

i'll see about putting together a PR.

jgangemi commented 8 years ago

any chance a release could be cut to roll out this fix?

gpedro commented 8 years ago

@jgangemi sorry for the delay

<dependency>
  <groupId>net.gpedro.integrations.slack</groupId>
  <artifactId>slack-webhook</artifactId>
  <version>1.1.2</version>
</dependency>