Skip to content

Conversation

@Choc13
Copy link
Contributor

@Choc13 Choc13 commented Apr 9, 2019

No description provided.

@Choc13 Choc13 requested review from baileydoestech and llawall April 9, 2019 07:35
README.md Outdated
Some recommendations on designing errors:
* Try not to create custom errors that are too granular. Model them as you would entities and use the language of the domain model to guide their creation. The concept should make sense to a domain expert.
* The title should be the same for all instances of the error. The details are where instance specific information can be provided. If you are creating a custom error, make the title static and only let clients customise the details. See implementations of errors in this library for examples.
* Don't use them for non-domain errors. Exceptions should still be used for system failures, such as network requests, and programming errors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double negative here, better to say 'only use of domain errors'

@Choc13 Choc13 merged commit 33dab61 into master Apr 9, 2019
@Choc13 Choc13 deleted the update-readme branch April 9, 2019 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants