Ok I see what you mean and I agree, we'll change our code to throw CmisObjectNotFoundException. Nevertheless I think the TCK should be more lenient (the spec does not mandate which exception should be thrown), so I'll also change it.
Florent On Tue, Oct 25, 2011 at 8:29 PM, Florian Müller <[email protected]> wrote: > Hi Florent, > > I think a CmisObjectNotFoundException is more appropriate than a > CmisInvalidArgumentException. The object, in this case the type, is not > found. The client did not provide an invalid value like a wrong enum > value or a value out of range. > > In HTTP terms, it's rather a 404 than a 400. > > > - Florian > > > > On 25/10/2011 07:23, Florent Guillaume wrote: >> Hi, >> >> In my repository, o.a.c.o.client.api.Session.getTypeDefinition throws >> a when you pass it an unknown type >> (cmis:policy in my case). However the TCK >> (AbstractSessionTest.hasPolicies in my case, but there are other >> places) expects a CmisObjectNotFoundException. >> >> I think that should be a legit exception for this case, but I'm open >> to arguments why not. If you think it's ok, I can change the TCK (and >> document the exceptions on the interface). >> >> Florent >> > > -- Florent Guillaume, Director of R&D, Nuxeo Open Source, Java EE based, Enterprise Content Management (ECM) http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
