Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353617

Summary: HttpClient.start() should not throw (generic) Exception
Product: [RT] Jetty Reporter: Joakim Erdfelt <joakim.erdfelt>
Component: clientAssignee: Michael Gorovoy <mgorovoy>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: jetty-inbox, mgorovoy
Version: 7.4.5   
Target Milestone: 7.5.x   
Hardware: All   
OS: All   
Whiteboard:

Description Joakim Erdfelt CLA 2011-08-02 12:51:17 EDT
[API Design]
HttpClient should specify the specific exceptions that cause it to fail.
Or it should toss an exception type that is specific to HttpClient, such as HttpClientException.
Comment 1 Michael Gorovoy CLA 2011-08-30 14:46:24 EDT
Changing the throws declaration of HttpClient.start() would not be possible to do because it is a method of LifeCycle interface that is declared final in AbstractLifeCycle. 

The only other way would be to wrap the exceptions in HttpClient.doStart() method. But I am not convinced that wrapping the exceptions that are result of starting several other LifeCycle(s) would make the task of the person implementing HttpClient significantly easier.

Joakim, if you could explain your justification for wrapping the exceptions, it would be great.

-Michael
Comment 2 Michael Gorovoy CLA 2011-08-30 14:46:55 EDT
Accidentally resolved.
Comment 3 Joakim Erdfelt CLA 2011-09-12 12:57:08 EDT
Marking as WONTFIX as HttpClient.start() is actually an implementation of the more fundamental jetty AbtractLifeCycle#start(), and this kind of change would far more impactful than its worth.