Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 632 Bytes

007-exceptions.md

File metadata and controls

12 lines (9 loc) · 632 Bytes

007 - Exceptions

  • Throw exceptions instead of returning an error code.
  • Exception class name must be suffixed with Exception.
  • Use grammatically correct error messages including ending punctuation, that's most exceptions must end with a period.
  • \InvalidArgumentException must be used directly. There should be no exceptions inherited from it.
  • \InvalidArgumentException must never be caught.

References