Hi, Am Montag, den 31.12.2007, 12:37 +0100 schrieb Carsten Ziegeler: > +1 for the proposal in general and I think we should drop the > HttpStatusCodeException as it seems a little bit wired to transfer a > status code by throwing an exception. And to expect that someone will > pick it up and do the appropriate thing.
Agreed, that it is somewhat weired and strange. The idea is, that the sling main servlet which is called to start the Sling request processing is catching the SlingException (and its extensions) and handle it appropriately. Of course, if the exception seems to weird, we might well remove it. Regards Felix > > Carsten > > Felix Meschberger wrote: > > Hi, > > > > Well, the HttpStatusCodeException is a usefull tool to provide an error > > code to the client of the request and quickly abort request processing. > > Otherwise more or less complicated code would have to be implemented to > > terminate a request - esp. in the case of included requests - after the > > sendError call. > > > > Therefore, making it a RuntimeException (a SlingException that is) would > > help have the exception pass through all the way up and have the Sling > > main servlet do the sendError call and terminate the request. > > > > I agree, that the HttpStatusCodeException is kind of weird. But because > > IOExceptions are generally caught, logged and further ignored, the goal > > of that exception would most probably almost never be met, if it would > > be an IOException (or whatever checked Exception). > > > > Of course, we could just as well drop that exception... > > > >
