The problem with connecting something like that with Sling Models is the way 
the adaptTo method was specified. 
It is supposed to return null and never throw an exception. So all exceptions 
being caused by e.g. validation errors must be caught within Sling Models. 
Currently I don’t see any way to propagate those exceptions across the adaptTo 
boundary. That might already be a problem when for example some required 
properties are missing. It is much harder to debug because the exception is 
caught within the Sling Models framework.
I would like to have the possibility to instantiate a model class and to be 
able to catch all potential exceptions within my own code.
Konrad

On 19 May 2014, at 14:53, Bertrand Delacretaz <[email protected]> wrote:

> On Mon, May 19, 2014 at 1:43 PM, Radu Cotescu <[email protected]> wrote:
>> ...Maybe we can revive that topic and merge the two ideas....
> 
> That would be great, IIRC Radu's SLING-2803 validator is meant to be
> generic, using it within Sling models should then just be another use
> case.
> 
> -Bertrand

Reply via email to