async-http-client icon indicating copy to clipboard operation
async-http-client copied to clipboard

Improve exceptions system

Open Spikhalskiy opened this issue 10 years ago • 0 comments

A current set of possible exceptions which you can get in AsyncCompletionHandler#onThrowable is unclear. It's not explained or enumerated in javadocs. Would be great to:

  1. Improve exceptions hierarchy. For example, it's very uncomfortable to get java.io.IOException: Too many connections per host. Theoretically, I can recover from this situation and I want to put this recovery block to catch(TooManyConnectionsPerHostExceptions){} block for example, but I couldn't because we use general-purpose exceptions.

  2. Add javadocs to the onThrowable method with list of possible custom exceptions and reasons.

Spikhalskiy avatar Oct 21 '15 17:10 Spikhalskiy