| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <sect1 id="zend.exception.basic">
- <title>Basic usage</title>
- <para>
- <classname>Zend_Exception</classname> is the base class for all exceptions thrown by Zend
- Framework. This class extends the base <classname>Exception</classname> class of PHP.
- </para>
- <example id="zend.exception.catchall.example">
- <title>Catch all Zend Framework exceptions</title>
- <programlisting language="php"><![CDATA[
- try {
- // your code
- } catch (Zend_Exception $e) {
- // do something
- }
- ]]></programlisting>
- </example>
- <example id="zend.exception.catchcomponent.example">
- <title>Catch exceptions thrown by a specific component of Zend Framework</title>
- <programlisting language="php"><![CDATA[
- try {
- // your code
- } catch (Zend_Db_Exception $e) {
- // do something
- }
- ]]></programlisting>
- </example>
- </sect1>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|