exceptions
Guilty Of PHP articles about exceptions
2 articles
-
Should a Custom PHP Exception Extend Exception or an SPL Subclass?
Choose LogicException for a program-logic failure, RuntimeException for an operational failure, or Exception when that distinction adds little.
-
Throw a PHP Exception When an Operation Fails, Then Catch It at the Caller
Use distinct exceptions for invalid input and an operation that cannot finish, let an intermediate function pass them through, and catch them where a useful response is possible.
