| Summary: | Add jetty io exception classes to __dftServerClasses | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | smparkes |
| Component: | server | Assignee: | Greg Wilkins <gregw> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | jesse.mcconnell, jetty-inbox |
| Version: | unspecified | ||
| Target Milestone: | 7.5.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
smparkes
We really don't want to do this as it exposes more then we want of jetty to a webapp classloader. that being said this does need to be addressed from the continuation perspective I think... we'll need to mull it over a bit I can understand that. And I just realized I conflated two things: io.EofException does extend java.io.EOFException. I was looking too quickly between RuntimeIOException and EofException and thought it didn't. So I think the eof case is okay: it can be caught with the java.io exception. RuntimeIOException might still be a bit problematic (at least going from the javadocs) because it turns an IOException into a RuntimeException. Though that can still be caught as a RuntimeException, then you can't differentiate it from other RT exceptions. I don't know why it was decided to turn an IO exception into a runtime exception, if there's a good reason for it. So I think that's the only issue here. Which this bug probably needs to be changed to 1) Not a bug (my original misunderstanding) 2) Closed as won't fix (because conflating runitme and io can't be changed for some reason) 3) Updated to reflect that the issue is an io exception should not be turned into a runtime exception In any case, thanks! The RuntimeIOException comes from our usage of UncheckedPrintWriter class. Writers do no have any thrown exceptions, but have a checkError() method instead. Unfortunately I've never ever ever seen any code that calls checkError and thus you often find application code that calls writers in a loop will act very badly if there is an underlying IOException. Hence we convert that to a RuntimeIOException. I'll think about if we can expose that... or if we can use an existing runtime exception instead. I don't think we shall change anything here. You can always catch an exception as a super type and ask it's actual type as a string if you really really want to know who through the exception. However, I will open a new issue to enhance jetty to make the runtimeIOException behaviour optional. Sounds good. Thanks for the help. Resolved -> Closed |