Zend_Exception-Basic.xml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <!-- EN-Revision: 24249 -->
  4. <sect1 id="zend.exception.basic">
  5. <title>基本的な使用法</title>
  6. <para>
  7. <classname>Zend_Exception</classname> はZend Framework でスローされる例外全ての基底クラスです。
  8. このクラスは、 <acronym>PHP</acronym> の基本的な <classname>Exception</classname> クラスを拡張します。
  9. </para>
  10. <example id="zend.exception.catchall.example">
  11. <title>Zend Framework の例外全てを捕捉する</title>
  12. <programlisting language="php"><![CDATA[
  13. try {
  14. // あなたのコード
  15. } catch (Zend_Exception $e) {
  16. // 何らかの処理
  17. }
  18. ]]></programlisting>
  19. </example>
  20. <example id="zend.exception.catchcomponent.example">
  21. <title>Zend Framework の特定のコンポーネントでスローされた例外を捕捉する</title>
  22. <programlisting language="php"><![CDATA[
  23. try {
  24. // あなたのコード
  25. } catch (Zend_Db_Exception $e) {
  26. // 何らかの処理
  27. }
  28. ]]></programlisting>
  29. </example>
  30. </sect1>
  31. <!--
  32. vim:se ts=4 sw=4 et:
  33. -->