Zend_Exception-Basic.xml 965 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.exception.basic">
  4. <title>Basic usage</title>
  5. <para>
  6. <classname>Zend_Exception</classname> is the base class for all exceptions thrown by Zend
  7. Framework. This class extends the base <classname>Exception</classname> class of PHP.
  8. </para>
  9. <example id="zend.exception.catchall.example">
  10. <title>Catch all Zend Framework exceptions</title>
  11. <programlisting language="php"><![CDATA[
  12. try {
  13. // your code
  14. } catch (Zend_Exception $e) {
  15. // do something
  16. }
  17. ]]></programlisting>
  18. </example>
  19. <example id="zend.exception.catchcomponent.example">
  20. <title>Catch exceptions thrown by a specific component of Zend Framework</title>
  21. <programlisting language="php"><![CDATA[
  22. try {
  23. // your code
  24. } catch (Zend_Db_Exception $e) {
  25. // do something
  26. }
  27. ]]></programlisting>
  28. </example>
  29. </sect1>
  30. <!--
  31. vim:se ts=4 sw=4 et:
  32. -->