コード例 #1
0
 /**
  * Calls the specified action method and passes the arguments.
  *
  * If the action returns a string, it is appended to the content in the
  * response object. If the action doesn't return anything and a valid
  * view exists, the view is rendered automatically.
  *
  * @return void
  * @api
  */
 protected function callActionMethod()
 {
     parent::callActionMethod();
     if (isset($this->feedFormats[$this->request->getFormat()])) {
         $this->sendHeaderAndFilename($this->feedFormats[$this->request->getFormat()], $this->request->getFormat());
     }
 }
コード例 #2
0
ファイル: ActionController.php プロジェクト: bash/Sugar
 /**
  * @api
  */
 public function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (NotFoundException $e) {
         $this->cleanupAction();
         $this->getGlobals()->getFrontendController()->pageNotFoundAndExit($e->getMessage());
     } catch (\Exception $e) {
         $this->cleanupAction();
         throw $e;
     }
     $this->cleanupAction();
 }
コード例 #3
0
 /**
  * @return void
  * @override \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
  */
 protected function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (\Exception $exception) {
         if ($this->isAjax) {
             if ($this->response instanceof \TYPO3\CMS\Extbase\Mvc\Web\Response) {
                 $this->response->setStatus(500);
             }
             $this->response->appendContent($exception->getMessage());
         } else {
             throw $exception;
         }
     }
 }
コード例 #4
0
 /**
  * @return void
  * @override \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
  */
 protected function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $exception) {
         throw $exception;
     } catch (\Exception $exception) {
         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($exception);
         if ($this->isAjax) {
             $output = $exception->getMessage();
             if ($this->response instanceof \TYPO3\CMS\Extbase\Mvc\Web\Response) {
                 $this->response->setStatus(500);
             }
             $this->response->appendContent($output);
         } else {
             throw $exception;
         }
     }
 }
コード例 #5
0
 /**
  * Handles all exceptions thrown inside the application
  */
 protected function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (Exception $exception) {
         if ($exception instanceof \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException) {
             throw $exception;
         }
         header('HTTP/1.1 500 Internal Server Error', true, 500);
         $this->response->setContent($exception->getCode());
         if ($exception instanceof \PunktDe\PtExtbase\Exception\LoggerException) {
             $this->logger->log($exception->getLogLevel(), sprintf('%s (%s)', $exception->getMessage(), $exception->getCode()), get_class($this));
         } else {
             $this->logger->error(sprintf('%s (%s)', $exception->getMessage(), $exception->getCode()), get_class($this));
         }
         $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager')->persistAll();
         $this->cleanUpAtException($exception);
         return $exception->getCode();
     }
 }
コード例 #6
0
 /**
  *
  * Calls a controller action. This method wraps the callActionMethod method of
  * the parent Tx_Extbase_MVC_Controller_ActionController class. It catches all
  * Exceptions that might be thrown inside one of the action methods.
  * This method ONLY catches exceptions that belong to the typo3_forum extension.
  * All other exceptions are not caught.
  *
  * @return void
  *
  */
 protected function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (AbstractException $e) {
         $this->handleError($e);
     }
 }