Zend_Exception.xml 990 B

1234567891011121314151617181920212223242526272829303132333435
  1. <sect1 id="zend.exception.using">
  2. <title>Koriscenje izuzetaka</title>
  3. <para>
  4. All exceptions thrown by Zend Framework classes should throw
  5. an exception that derives from the base class Zend_Exception.
  6. </para>
  7. <example id="zend.exception.using.example">
  8. <title>Example of catching an exception</title>
  9. <programlisting role="php"><![CDATA[<?php
  10. try {
  11. Zend_Loader::loadClass('nonexistantclass');
  12. } catch (Zend_Exception $e) {
  13. echo "Caught exception: " . get_class($e) . "\n";
  14. echo "Message: " . $e->getMessage() . "\n";
  15. // other code to recover from the failure.
  16. }
  17. ?>]]></programlisting>
  18. </example>
  19. <para>
  20. See the documentation for each respective Zend Framework
  21. component for more specific information on which methods
  22. throw exceptions, the circumstances for the exceptions,
  23. and which exception classes derive from Zend_Exception.
  24. </para>
  25. </sect1>
  26. <!--
  27. vim:se ts=4 sw=4 et:
  28. -->