<sect1 id="zend.exception.using">

    <title>Koriscenje izuzetaka</title>

    <para>
        All exceptions thrown by Zend Framework classes should throw
        an exception that derives from the base class Zend_Exception.
    </para>

    <example id="zend.exception.using.example">
        <title>Example of catching an exception</title>
        <programlisting role="php"><![CDATA[<?php

try {
    Zend_Loader::loadClass('nonexistantclass');
} catch (Zend_Exception $e) {
    echo "Caught exception: " . get_class($e) . "\n";
    echo "Message: " . $e->getMessage() . "\n";
    // other code to recover from the failure.
}

?>]]></programlisting>
    </example>

    <para>
        See the documentation for each respective Zend Framework
        component for more specific information on which methods
        throw exceptions, the circumstances for the exceptions,
        and which exception classes derive from Zend_Exception.
    </para>

</sect1>
<!--
vim:se ts=4 sw=4 et:
-->
