dfuncd / repofuck

Fucking with the Repository Design Pattern
6 stars 2 forks source link

findOrfail() instead of find() #116

Closed jcricaro closed 7 years ago

jcricaro commented 7 years ago

this way, we can catchModelNotFound exceptions.

makoru-hikage commented 7 years ago

See commit 60faa6beb4444ddc44b07ce0d505cb27d3fe54ca

makoru-hikage commented 7 years ago

One probable reason is that responsibilities involving such exceptions are left to the end-users.

rmrhz commented 7 years ago

The problem of however is that the error message caught would result in naming the entity which is a bad move on my part.