Привет! Поздравляю с Днем Программиста! К вопросу... Имеется скрипт: Код (Text): abstract class abstract_database { /** * @var null */ private $_pdo = null; /** * @var null */ private $_reflection = null; /** * @var null */ private $_table_prefix = null; /** * @var null */ private $_args = null; /** * @param string $dsn * @param string $user * @param string $password * @param array $driver_options */ public function __construct($dsn, $user, $password, array $driver_options = array()) { try { $this->_pdo = new PDO($dsn, $user, $password, $driver_options); } catch (PDOException $e) { $this->_showError($e); } try { $this->_reflection = new ReflectionClass($this->_pdo); } catch (ReflectionException $e) { $this->_showError($e); } } /** * @param string $name * @param mixed $args * @return mixed */ public function __call($name, $args) { $this->_args = $args; try { if ($this->_reflection->hasMethod($name)) { $method = $this->_reflection->getMethod($name); if ($method->isPublic() && !$method->isAbstract()) { if (in_array($name, array('exec', 'query', 'prepare'))) { $args = $this->_tablePrefix(array_shift($args)); } elseif (in_array($name, array('quote', 'lastInsertId'))) { $args = array_shift($args); } try { return $method->invoke($this->_pdo, $args); } catch (PDOException $e) { $this->_showError($e); } } } throw new ReflectionException('Reflection: The method is not defined!'); } catch (ReflectionException $e) { $this->_showError($e); } } /** * @param string $prefix * @return string */ public function tablePrefix($prefix) { $this->_table_prefix = $prefix; } /** * @param string $statement * @return string */ private function _tablePrefix($statement) { return str_replace('#_', $this->_table_prefix, $statement); } /** * @param Exception $e */ private function _showError(Exception $e) { header('Content-type:text/plain; charset=utf-8;'); die($e->getMessage() . PHP_EOL . PHP_EOL . $e->getTraceAsString() . PHP_EOL . PHP_EOL . implode( PHP_EOL, $this->_args )); } } Затем в моделе использую Код (Text): function update_records($fields) { $rs = $this->_db->prepare( 'UPDATE ' . $this->_table . ' SET `hidden` = 0' ); $rs->execute(); $update_rs = $this->_db->prepare( 'UPDATE ' . $this->_table . ' SET `hidden` = :hidden WHERE `id`= :id' ); $delete_rs = $this->_db->prepare( 'DELETE FROM ' . $this->_table . ' WHERE `id` = :id' ); foreach ($fields as $row_id => $row) { if (isset($row['delete'])) { $delete_rs->execute(array(':id' => $row_id)); } else { $update_rs->execute(array(':hidden' => $row['hidden'], ':id' => $row_id)); } } } И при удалении записи вижу крит: http://joxi.ru/uAYzUtg5CbBEbuNtOLY В xdebug: xdebug.show_exception_trace=Off Подскажите, почему exception не перехватывается в abstract_database->__call Заранее благодарю!