Closed jurajsimbs closed 8 years ago
I agree, the method should definitely throw specific error objects.
Thank you for the suggestion.
Is available on both the develop
and v1.0
branches.
if model is not found, it throws CouchbaseODM.errors.ModelNotFoundError
for any other error it throws CouchbaseODM.errors.ModelManagerError
.
in modelManager.js:
for example I'd like catch notFound error and in that case load model from somewhere. Wrong name can stay general
Error
and I'd pass that to main loopwhat do you think?