From c5595af045b847c3b71aca0db17748aa6527d83f Mon Sep 17 00:00:00 2001 From: Christoph Kratz <ckr@rtp.ch> Date: Mon, 18 Apr 2016 13:39:35 +0200 Subject: [PATCH] [TASK] Remove duplicate exception numbers Resolves: #75737 Releases: master Change-Id: Ia18d946b5e930306cd01ba1a0a275da8d2edc1f3 Reviewed-on: https://review.typo3.org/47744 Reviewed-by: Nicole Cordes <typo3@cordes.co> Tested-by: Nicole Cordes <typo3@cordes.co> Reviewed-by: Christoph Kratz <ckr@rtp.ch> Tested-by: Christoph Kratz <ckr@rtp.ch> Reviewed-by: Daniel Goerz <ervaude@gmail.com> Tested-by: Daniel Goerz <ervaude@gmail.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- typo3/sysext/backend/Classes/Controller/LoginController.php | 2 +- .../backend/Tests/Unit/Controller/LoginControllerTest.php | 2 +- .../Classes/Controller/BackendUserGroupController.php | 2 +- .../core/Classes/FormProtection/FrontendFormProtection.php | 2 +- .../core/Classes/Imaging/IconProvider/SvgIconProvider.php | 4 ++-- typo3/sysext/core/Classes/Imaging/IconRegistry.php | 2 +- typo3/sysext/core/Classes/Locking/SemaphoreLockStrategy.php | 4 ++-- typo3/sysext/core/Classes/Locking/SimpleLockStrategy.php | 6 +++--- .../sysext/dbal/Classes/Database/AdodbPreparedStatement.php | 2 +- .../Classes/Persistence/Generic/Storage/Typo3DbBackend.php | 2 +- .../Persistence/Generic/Storage/Typo3DbQueryParser.php | 2 +- .../fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php | 2 +- typo3/sysext/form/Classes/ViewHelpers/SelectViewHelper.php | 6 +++--- .../Classes/Controller/TypoScriptFrontendController.php | 4 ++-- .../rtehtmlarea/Classes/Form/Element/RichTextElement.php | 2 +- .../rtehtmlarea/Classes/ImageHandler/EditImageHandler.php | 2 +- 16 files changed, 23 insertions(+), 23 deletions(-) diff --git a/typo3/sysext/backend/Classes/Controller/LoginController.php b/typo3/sysext/backend/Classes/Controller/LoginController.php index 36c8e60fc1d5..4923a2e53747 100644 --- a/typo3/sysext/backend/Classes/Controller/LoginController.php +++ b/typo3/sysext/backend/Classes/Controller/LoginController.php @@ -457,7 +457,7 @@ class LoginController throw new \RuntimeException('Missing configuration for login provider "' . $identifier . '".', 1433416043); } if (!is_string($configuration['provider']) || empty($configuration['provider']) || !class_exists($configuration['provider']) || !is_subclass_of($configuration['provider'], LoginProviderInterface::class)) { - throw new \RuntimeException('The login provider "' . $identifier . '" defines an invalid provider. Ensure the class exists and implements the "' . LoginProviderInterface::class . '".', 1433416043); + throw new \RuntimeException('The login provider "' . $identifier . '" defines an invalid provider. Ensure the class exists and implements the "' . LoginProviderInterface::class . '".', 1460977275); } if (empty($configuration['label'])) { throw new \RuntimeException('Missing label definition for login provider "' . $identifier . '".', 1433416044); diff --git a/typo3/sysext/backend/Tests/Unit/Controller/LoginControllerTest.php b/typo3/sysext/backend/Tests/Unit/Controller/LoginControllerTest.php index 97e1cba85274..4a2265761342 100644 --- a/typo3/sysext/backend/Tests/Unit/Controller/LoginControllerTest.php +++ b/typo3/sysext/backend/Tests/Unit/Controller/LoginControllerTest.php @@ -85,7 +85,7 @@ class LoginControllerTest extends UnitTestCase /** * @test * @expectedException \RuntimeException - * @expectedExceptionCode 1433416043 + * @expectedExceptionCode 1460977275 */ public function validateAndSortLoginProvidersDetectsWrongProvider() { diff --git a/typo3/sysext/beuser/Classes/Controller/BackendUserGroupController.php b/typo3/sysext/beuser/Classes/Controller/BackendUserGroupController.php index 5b88829c8933..53107eaee1e9 100644 --- a/typo3/sysext/beuser/Classes/Controller/BackendUserGroupController.php +++ b/typo3/sysext/beuser/Classes/Controller/BackendUserGroupController.php @@ -48,7 +48,7 @@ class BackendUserGroupController extends BackendUserActionController // circumvented until there is a better solution in extbase. // For now we throw an exception if no settings are detected. if (empty($this->settings)) { - throw new \RuntimeException('No settings detected. This module can not work then. This usually happens if there is no frontend TypoScript template with root flag set. ' . 'Please create a frontend page with a TypoScript root template.', 1344375003); + throw new \RuntimeException('No settings detected. This module can not work then. This usually happens if there is no frontend TypoScript template with root flag set. ' . 'Please create a frontend page with a TypoScript root template.', 1460976089); } } diff --git a/typo3/sysext/core/Classes/FormProtection/FrontendFormProtection.php b/typo3/sysext/core/Classes/FormProtection/FrontendFormProtection.php index ca15ce62bcfe..e9513369fea6 100644 --- a/typo3/sysext/core/Classes/FormProtection/FrontendFormProtection.php +++ b/typo3/sysext/core/Classes/FormProtection/FrontendFormProtection.php @@ -89,7 +89,7 @@ class FrontendFormProtection extends AbstractFormProtection $this->frontendUser = $frontendUser; $this->validationFailedCallback = $validationFailedCallback; if (!$this->isAuthorizedFrontendSession()) { - throw new \TYPO3\CMS\Core\Error\Exception('A front-end form protection may only be instantiated if there is an active front-end session.', 1285067843); + throw new \TYPO3\CMS\Core\Error\Exception('A front-end form protection may only be instantiated if there is an active front-end session.', 1460975777); } } diff --git a/typo3/sysext/core/Classes/Imaging/IconProvider/SvgIconProvider.php b/typo3/sysext/core/Classes/Imaging/IconProvider/SvgIconProvider.php index 8e1e5e543870..e12b996401d2 100644 --- a/typo3/sysext/core/Classes/Imaging/IconProvider/SvgIconProvider.php +++ b/typo3/sysext/core/Classes/Imaging/IconProvider/SvgIconProvider.php @@ -46,7 +46,7 @@ class SvgIconProvider implements IconProviderInterface protected function generateMarkup(Icon $icon, array $options) { if (empty($options['source'])) { - throw new \InvalidArgumentException('[' . $icon->getIdentifier() . '] The option "source" is required and must not be empty', 1440754980); + throw new \InvalidArgumentException('[' . $icon->getIdentifier() . '] The option "source" is required and must not be empty', 1460976566); } $source = $options['source']; @@ -68,7 +68,7 @@ class SvgIconProvider implements IconProviderInterface protected function generateInlineMarkup(Icon $icon, array $options) { if (empty($options['source'])) { - throw new \InvalidArgumentException('The option "source" is required and must not be empty', 1440754980); + throw new \InvalidArgumentException('The option "source" is required and must not be empty', 1460976610); } $source = $options['source']; diff --git a/typo3/sysext/core/Classes/Imaging/IconRegistry.php b/typo3/sysext/core/Classes/Imaging/IconRegistry.php index c5802fe95357..3725aada3051 100644 --- a/typo3/sysext/core/Classes/Imaging/IconRegistry.php +++ b/typo3/sysext/core/Classes/Imaging/IconRegistry.php @@ -2791,7 +2791,7 @@ class IconRegistry implements SingletonInterface { GeneralUtility::logDeprecatedFunction(); if (!$this->isDeprecated($identifier)) { - throw new Exception('Icon with identifier "' . $identifier . '" is not deprecated"', 1437425804); + throw new Exception('Icon with identifier "' . $identifier . '" is not deprecated"', 1460976527); } return $this->deprecatedIcons[$identifier]; } diff --git a/typo3/sysext/core/Classes/Locking/SemaphoreLockStrategy.php b/typo3/sysext/core/Classes/Locking/SemaphoreLockStrategy.php index b560da450652..f170465ea2dd 100644 --- a/typo3/sysext/core/Classes/Locking/SemaphoreLockStrategy.php +++ b/typo3/sysext/core/Classes/Locking/SemaphoreLockStrategy.php @@ -57,11 +57,11 @@ class SemaphoreLockStrategy implements LockingStrategyInterface // does not exist, this issue should be solved on a different // level of the application. if (!GeneralUtility::mkdir($path)) { - throw new LockCreateException('Cannot create directory ' . $path, 1395140007); + throw new LockCreateException('Cannot create directory ' . $path, 1460976250); } } if (!is_writable($path)) { - throw new LockCreateException('Cannot write to directory ' . $path, 1396278700); + throw new LockCreateException('Cannot write to directory ' . $path, 1460976320); } $this->filePath = $path . 'sem_' . md5((string)$subject); touch($this->filePath); diff --git a/typo3/sysext/core/Classes/Locking/SimpleLockStrategy.php b/typo3/sysext/core/Classes/Locking/SimpleLockStrategy.php index e34f07558c25..851705306196 100644 --- a/typo3/sysext/core/Classes/Locking/SimpleLockStrategy.php +++ b/typo3/sysext/core/Classes/Locking/SimpleLockStrategy.php @@ -60,11 +60,11 @@ class SimpleLockStrategy implements LockingStrategyInterface // does not exist, this issue should be solved on a different // level of the application. if (!GeneralUtility::mkdir($path)) { - throw new LockCreateException('Cannot create directory ' . $path, 1395140007); + throw new LockCreateException('Cannot create directory ' . $path, 1460976286); } } if (!is_writable($path)) { - throw new LockCreateException('Cannot write to directory ' . $path, 1396278700); + throw new LockCreateException('Cannot write to directory ' . $path, 1460976340); } $this->filePath = $path . 'simple_' . md5((string)$subject); } @@ -172,7 +172,7 @@ class SimpleLockStrategy implements LockingStrategyInterface } if ($mode & self::LOCK_CAPABILITY_NOBLOCK && !$this->isAcquired && $wouldBlock) { - throw new LockAcquireWouldBlockException('Failed to acquire lock because the request would block.', 1428700748); + throw new LockAcquireWouldBlockException('Failed to acquire lock because the request would block.', 1460976403); } return $this->isAcquired; diff --git a/typo3/sysext/dbal/Classes/Database/AdodbPreparedStatement.php b/typo3/sysext/dbal/Classes/Database/AdodbPreparedStatement.php index be9114247f54..fcc81aadcc0c 100644 --- a/typo3/sysext/dbal/Classes/Database/AdodbPreparedStatement.php +++ b/typo3/sysext/dbal/Classes/Database/AdodbPreparedStatement.php @@ -150,7 +150,7 @@ class AdodbPreparedStatement extends \TYPO3\CMS\Dbal\Database\DatabaseConnection break; default: // Same error as in \TYPO3\CMS\Core\Database\PreparedStatement::execute() - throw new \InvalidArgumentException(sprintf('Unknown type %s used for parameter %s.', $this->parameters[$i]['type'], $i + 1), 1281859196); + throw new \InvalidArgumentException(sprintf('Unknown type %s used for parameter %s.', $this->parameters[$i]['type'], $i + 1), 1460975728); } $queryParts[$i * 2 + 1] = $value; diff --git a/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php b/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php index 7e18a80a4f38..5a41de2d6011 100755 --- a/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php +++ b/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php @@ -654,7 +654,7 @@ class Typo3DbBackend implements BackendInterface, \TYPO3\CMS\Core\SingletonInter { // @todo profile this method again if (substr_count($sqlString, '?') !== count($parameters)) { - throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception('The number of question marks to replace must be equal to the number of parameters.', 1242816074); + throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception('The number of question marks to replace must be equal to the number of parameters.', 1460975513); } $offset = 0; foreach ($parameters as $parameter) { diff --git a/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php b/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php index e92aecb74482..cb6f32a84179 100644 --- a/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php +++ b/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php @@ -667,7 +667,7 @@ class Typo3DbQueryParser implements \TYPO3\CMS\Core\SingletonInterface } elseif (!$ignoreEnableFields && !$includeDeleted) { $statement .= $this->getPageRepository()->enableFields($tableName); } elseif (!$ignoreEnableFields && $includeDeleted) { - throw new InconsistentQuerySettingsException('Query setting "ignoreEnableFields=FALSE" can not be used together with "includeDeleted=TRUE" in frontend context.', 1327678173); + throw new InconsistentQuerySettingsException('Query setting "ignoreEnableFields=FALSE" can not be used together with "includeDeleted=TRUE" in frontend context.', 1460975922); } return $statement; } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php index f8e8dabd9520..f4f2f1776f96 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php @@ -118,7 +118,7 @@ class ImageViewHelper extends AbstractViewHelper $absolute = $arguments['absolute']; if (is_null($src) && is_null($image) || !is_null($src) && !is_null($image)) { - throw new Exception('You must either specify a string src or a File object.', 1382284105); + throw new Exception('You must either specify a string src or a File object.', 1460976233); } try { diff --git a/typo3/sysext/form/Classes/ViewHelpers/SelectViewHelper.php b/typo3/sysext/form/Classes/ViewHelpers/SelectViewHelper.php index e8e500dc21d3..0db3dca22796 100644 --- a/typo3/sysext/form/Classes/ViewHelpers/SelectViewHelper.php +++ b/typo3/sysext/form/Classes/ViewHelpers/SelectViewHelper.php @@ -69,7 +69,7 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\SelectViewHelpe if (method_exists($key, '__toString')) { $key = (string)$key; } else { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Identifying value for object of class "' . get_class($value) . '" was an object.', 1247827428); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Identifying value for object of class "' . get_class($value) . '" was an object.', 1460975593); } } // @todo use $this->persistenceManager->isNewObject() once it is implemented @@ -78,7 +78,7 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\SelectViewHelpe } elseif (method_exists($value, '__toString')) { $key = (string)$value; } else { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('No identifying value for object of class "' . get_class($value) . '" found.', 1247826696); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('No identifying value for object of class "' . get_class($value) . '" found.', 1460975538); } if ($this->hasArgument('optionLabelField')) { $value = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyPath($value, $this->arguments['optionLabelField']); @@ -86,7 +86,7 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\SelectViewHelpe if (method_exists($value, '__toString')) { $value = (string)$value; } else { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Label value for object of class "' . get_class($value) . '" was an object without a __toString() method.', 1247827553); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Label value for object of class "' . get_class($value) . '" was an object without a __toString() method.', 1460975633); } } } elseif (method_exists($value, '__toString')) { diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php index 297a040f90b3..dc7b329a2d3a 100644 --- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php +++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php @@ -4653,7 +4653,7 @@ class TypoScriptFrontendController if ($locked) { break; } else { - throw new \RuntimeException('Could not acquire page lock for ' . $key . '.', 1294586098); + throw new \RuntimeException('Could not acquire page lock for ' . $key . '.', 1460975877); } } while (true); } @@ -4670,7 +4670,7 @@ class TypoScriptFrontendController { if ($this->locks[$type]['accessLock']) { if (!$this->locks[$type]['accessLock']->acquire()) { - throw new \RuntimeException('Could not acquire access lock for "' . $type . '"".', 1294586098); + throw new \RuntimeException('Could not acquire access lock for "' . $type . '"".', 1460975902); } $this->locks[$type]['pageLock']->release(); diff --git a/typo3/sysext/rtehtmlarea/Classes/Form/Element/RichTextElement.php b/typo3/sysext/rtehtmlarea/Classes/Form/Element/RichTextElement.php index 088db4589fd3..1b6ac40c9ea9 100644 --- a/typo3/sysext/rtehtmlarea/Classes/Form/Element/RichTextElement.php +++ b/typo3/sysext/rtehtmlarea/Classes/Form/Element/RichTextElement.php @@ -959,7 +959,7 @@ class RichTextElement extends AbstractFormElement } $failure = GeneralUtility::writeFileToTypo3tempDir($destination, $minifiedJavaScript ? $minifiedJavaScript : $contents); if ($failure) { - throw new \RuntimeException($failure, 1294585668); + throw new \RuntimeException($failure, 1460975840); } } if (isset($GLOBALS['TSFE'])) { diff --git a/typo3/sysext/rtehtmlarea/Classes/ImageHandler/EditImageHandler.php b/typo3/sysext/rtehtmlarea/Classes/ImageHandler/EditImageHandler.php index 1c60743cd199..e8691430adf7 100644 --- a/typo3/sysext/rtehtmlarea/Classes/ImageHandler/EditImageHandler.php +++ b/typo3/sysext/rtehtmlarea/Classes/ImageHandler/EditImageHandler.php @@ -50,7 +50,7 @@ class EditImageHandler implements LinkHandlerInterface, LinkParameterProviderInt public function initialize(AbstractLinkBrowserController $linkBrowser, $identifier, array $configuration) { if (!$linkBrowser instanceof SelectImageController) { - throw new \InvalidArgumentException('The given $linkBrowser must be of type SelectImageController."', 1455499721); + throw new \InvalidArgumentException('The given $linkBrowser must be of type SelectImageController."', 1460976644); } $this->selectImageController = $linkBrowser; } -- GitLab