function on_exception($message, $e = null) { if ($this->_exception) { return; } // triggered twice? $this->_exception = true; if (!$e) { $e = new Exception($message); } $this->renderer->set_data('exception', $e); if (loader::in_ajax()) { $this->renderer->set_ajax_message($e->getMessage())->set_ajax_result(false)->ajax_flush(); } else { $this->renderer->set_template('error'); // @todo вникуда: output_editor override this } }