Zend_Exception-Basic.xml 991 B

1234567891011121314151617181920212223242526272829303132333435363738
  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
  8. <acronym>PHP</acronym>.
  9. </para>
  10. <example id="zend.exception.catchall.example">
  11. <title>Catch all Zend Framework exceptions</title>
  12. <programlisting language="php"><![CDATA[
  13. try {
  14. // your code
  15. } catch (Zend_Exception $e) {
  16. // do something
  17. }
  18. ]]></programlisting>
  19. </example>
  20. <example id="zend.exception.catchcomponent.example">
  21. <title>Catch exceptions thrown by a specific component of Zend Framework</title>
  22. <programlisting language="php"><![CDATA[
  23. try {
  24. // your code
  25. } catch (Zend_Db_Exception $e) {
  26. // do something
  27. }
  28. ]]></programlisting>
  29. </example>
  30. </sect1>
  31. <!--
  32. vim:se ts=4 sw=4 et:
  33. -->