RE: Status class should have a Throwable field

2008-01-31 Thread Jerome Louvel
: Re: Status class should have a Throwable field OK, fine: then simply add a constructor that takes a Throwable as well as a getThrown() method. Status can stay immutable. - Paul On Jan 26, 2008, at 1:06 PM, Stephan Koops wrote: Hello Paul, if I understood you right, than you

Status class should have a Throwable field

2008-01-26 Thread Paul J. Lucas
I would like to be able to have code like: try { // ... } catch ( SomeException e ) { response.setStatus( CLIENT_ERROR_BAD_REQUEST, e ); } That is that you can pass a Throwable to setStatus() and that the Status class have the additional

Re: Status class should have a Throwable field

2008-01-26 Thread Stephan Koops
Hello Paul, if I understood you right, than you want to add method to the class Status to save the exception in the status object. But the Status objects are immutable as all metadata. So this won't work. best regards Stephan Paul J. Lucas schrieb: I would like to be able to have code

Re: Status class should have a Throwable field

2008-01-26 Thread Paul J. Lucas
OK, fine: then simply add a constructor that takes a Throwable as well as a getThrown() method. Status can stay immutable. - Paul On Jan 26, 2008, at 1:06 PM, Stephan Koops wrote: Hello Paul, if I understood you right, than you want to add method to the class Status to save the