Wrapping the exception is ok as long as the old exception is still accessible. 
One can easily write a ServletFilter which catches (and unwraps) the exception 
to throw the 500!
With the adaptTo approach the exception will never hit any servlet filter!

> On 15. Apr 2020, at 18:04, Radu Cotescu <[email protected]> wrote:
> 
> But that already happens in this case. If none of the Use providers can 
> provide an object the HTL engine throws a SightlyException. The logging I 
> mentioned is only supposed to help with debugging.
> 
>> On 15 Apr 2020, at 17:56, Konrad Windszus <[email protected]> wrote:
>> 
>> My point is: Noone should catch such a non-recoverable development 
>> exception. Otherwise the underlying bug might slip through. So logging is 
>> IMHO not sufficient. The exception should bubble up and lead to a 500 status!
> 

Reply via email to