Re: failure to add to a repository

Jörgen Andersson <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <CAFp=OHnuMKzgZBXePek5TiY8YNY1k-e5e-jQRTmF4wR79su-iQ@mail.gmail.com>
I would go for exceptions if anything goes wrong.
Jörgen
Den 10 apr 2013 19:52 skrev "Caleb Cushing" <[email protected]>:

> **
>
>
> I'm designing a RESTful web service...
>
> My problem is that in thinking a repository has a collection
> interface. Given that an add operation on a collection usually either
> returns t/f, void, or the object (depending on language). But both
> database access and http have further ways of describing the failure
> than a simple succeed/fail.
>
> This could be handled in one of 2 ways, custom exceptions or status
> codes, I'm writing to see what is generally preferred?
>
> --
> Caleb Cushing
>
> http://xenoterracide.com
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.