Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time

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 i.e. most exceptions must end with period.
  • \InvalidArgumentException must be used directly. There should be no exceptions inherited from it.
  • \InvalidArgumentException must never be caught.