Basic Rules of Exception in PHP

Started by thiruvasagamani, Aug 13, 2008, 05:06 PM

Previous topic - Next topic

thiruvasagamani

*Code may be surrounded in a try block, to help catch potential exceptions

*Each try block or "throw" must have at least one corresponding catch block

*Multiple catch blocks can be used to catch different classes of exceptions

*Exceptions can be thrown (or re-thrown) in a catch block within a try block


A simple rule: If you throw something, you have to catch it.
Thiruvasakamani Karnan