Followup to #9615. Throw SPL UnexpectedValueException rather than a custom exception.
authorJeff Segars <jsegars@alumni.rice.edu>
Thu, 6 Nov 2008 20:45:50 +0000 (20:45 +0000)
committerJeff Segars <jsegars@alumni.rice.edu>
Thu, 6 Nov 2008 20:45:50 +0000 (20:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4430 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_frontendedit.php
t3lib/exception/class.t3lib_exception_frontendedit.php [deleted file]

index daab5fc..b833508 100644 (file)
@@ -435,7 +435,7 @@ class t3lib_frontendedit {
         * Basically taking in the data and commands and passes them on to the proper classes as they should be.
         *
         * @return      void
-        * @throws t3lib_exception_InvalidFrontendEditAction if TSFE_EDIT[cmd] is not a valid command
+        * @throws UnexpectedValueException if TSFE_EDIT[cmd] is not a valid command
         * @see index_ts.php
         */
        public function editAction() {
@@ -455,12 +455,10 @@ class t3lib_frontendedit {
                        if(is_callable(array($this, $cmd))) {
                                $this->$cmd($table, $uid);
                        } else {
-                               require_once(PATH_t3lib . 'exception/class.t3lib_exception_frontendedit.php');
-                               throw new t3lib_exception_frontendedit(
+                               throw new UnexpectedValueException(
                                        'The specified frontend edit command (' . $cmd . ') is not valid.',
                                        1225818120
                                );
-
                        }
                }
                        // Data:
diff --git a/t3lib/exception/class.t3lib_exception_frontendedit.php b/t3lib/exception/class.t3lib_exception_frontendedit.php
deleted file mode 100644 (file)
index cb7d3e0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2008 Jeff Segars <jeff@webempoweredchurch.org>
-*  (c) 2008 David Slayback <dave@webempoweredchurch.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * An "Invalid Frontend Edit Action" exception.
- *
- * $Id$
- *
- * @package TYPO33
- * @subpackage t3lib
- */
-class t3lib_exception_frontendedit extends Exception {
-
-}
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/exception/class.t3lib_exception_frontendedit.php']) {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/exception/class.t3lib_exception_frontendedit.php']);
-}
-
-?>
\ No newline at end of file