Programmer's Reference Guide

例外の使用法

基本的な使用法

Zend_Exception はZend Framework でスローされる例外全ての基底クラスです。 このクラスは、 PHP の基本的な Exception クラスを拡張します。

例1 Zend Framework の例外全てを捕捉する

  1. try {
  2.     // あなたのコード
  3. } catch (Zend_Exception $e) {
  4.     // 何らかの処理
  5. }

例2 Zend Framework の特定のコンポーネントでスローされた例外を捕捉する

  1. try {
  2.     // あなたのコード
  3. } catch (Zend_Db_Exception $e) {
  4.     // 何らかの処理
  5. }

例外の使用法

+ Add A Comment

Please do not report issues via comments; use the ZF Issue Tracker.

If you have a JIRA/Crowd account, we suggest you login first before commenting.

  • BBCode is allowed in the comment markup

  • Select a Version

    Languages Available

    Components

    Search the Manual