path->controllers ); //---------------------------------------------------------- // エラー処理用 //---------------------------------------------------------- $frontController = Zend_Controller_Front::getInstance(); $response = $frontController->getResponse(); if ( $response->isException() ) { // エラーログを残す require_once 'Zend/Log.php'; require_once 'Zend/Log/Writer/Stream.php'; $dataFilePath = $config->path->app . '/data/error_log/' . date( 'Ym' ) . '.log'; // データファイルパス $writer = new Zend_Log_Writer_Stream( $dataFilePath ); $logger = new Zend_Log( $writer ); // メッセージ取得 $e = $response->getException(); foreach ( $e as $key => $val ) { if ( get_class($val) == 'PDOException' || get_class($val) == 'Zend_Db_Table_Exception' ) { // DB関連 $profiler = Zend_Registry::get('db')->getProfiler(); //$msg = $profiler->getLastQueryProfile(); // 最後のクエリ $msg = $profiler->getQueryProfiles(); // すべてのクエリ print("
".var_dump($msg)."
".$msg."