DEV Community

Lorenzo Tinfena
Lorenzo Tinfena

Posted on • Updated on

Code conventions

I'm thinking about this conventions, tell me what you think about that:
1) Use LBYL when you can, EAFP when you must.
2) In every function you can throw exceptions in order to explicit software bugs.
3) Error labels in the interface only to explicit user errors, included in the software working domain.
4) One or some optional very big try catch in order to save log data, and then crash.
5) Logs must be divided in two types: standard logs, and warning logs. (software errors are explicited only from exceptions)

Top comments (0)