/** * Overloaded execute function to handle exceptions in JSON requests */ public function execute($action, KCommandContext $context) { try { return parent::execute($action, $context); } catch (KControllerException $e) { $this->_handleException($e); } catch (KModelException $e) { $this->_handleException($e); } }