How to handle exceptions when writing a library (not an application) - Java
问题 I'm currently writing an Java Wrapper for a RESTful web services API. I'm now trying to clean up some of the exception handling, and not sure what approach to take. This is a tool intended to be used by Java programmers, so I can't really handle it the same way I would with a end-user application. If I have a method (connection) that contains code that could throw exceptions, how do I get those exceptions to float up to the end-programmer? and is this even the way I should handle it,