[TASK] Improve duplicate exception code check 50/50150/20
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 9 Oct 2016 18:07:53 +0000 (20:07 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 10 Oct 2016 19:46:58 +0000 (21:46 +0200)
* better regex finds more with less false positives
* use grep instead of ack-grep
* find exceptions without exception code
* the script kills travis for unkown reasons and removed

Change-Id: I6ae7c005bc9f493365d36f9602aebf389f1f7786
Resolves: #78221
Releases: master
Reviewed-on: https://review.typo3.org/50150
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
84 files changed:
.travis.yml
typo3/sysext/backend/Classes/Console/CliRequestHandler.php
typo3/sysext/backend/Classes/Controller/File/EditFileController.php
typo3/sysext/backend/Classes/Routing/UriBuilder.php
typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php
typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/Fixtures/TestCondition.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaCheckboxItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRadioItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php
typo3/sysext/core/Build/Scripts/duplicateExceptionCodeCheck.sh
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php
typo3/sysext/core/Classes/Console/CommandRequestHandler.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Classes/Database/Query/BulkInsertQuery.php
typo3/sysext/core/Classes/Error/ErrorHandler.php
typo3/sysext/core/Classes/ExtDirect/ExtDirectRouter.php
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
typo3/sysext/core/Classes/Resource/Processing/TaskTypeRegistry.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Tests/BaseTestCase.php
typo3/sysext/core/Classes/Tests/Testbase.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Resources/PHP/ClassMapGenerator.php
typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php
typo3/sysext/core/Tests/Functional/DataHandling/Framework/DataSet.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Classes/Controller/AbstractController.php
typo3/sysext/core/Tests/Functional/Framework/Frontend/ResponseContent.php
typo3/sysext/core/Tests/Unit/Cache/CacheManagerTest.php
typo3/sysext/core/Tests/Unit/Cache/Fixtures/FrontendDefaultFixture.php
typo3/sysext/core/Tests/Unit/Error/DebugExceptionHandlerTest.php
typo3/sysext/core/Tests/Unit/Error/ProductionExceptionHandlerTest.php
typo3/sysext/core/Tests/Unit/Localization/LocalizationFactoryTest.php
typo3/sysext/core/Tests/Unit/Log/Fixtures/WriterFailing.php
typo3/sysext/core/Tests/Unit/Log/LogRecordTest.php
typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php
typo3/sysext/core/Tests/Unit/Utility/Fixtures/GeneralUtilityMinifyJavaScriptFixture.php
typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php
typo3/sysext/extbase/Classes/Mvc/Controller/CommandController.php
typo3/sysext/extbase/Classes/Mvc/Dispatcher.php
typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php
typo3/sysext/extbase/Classes/Object/Container/Container.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
typo3/sysext/extbase/Classes/Persistence/Generic/PersistenceManager.php
typo3/sysext/extbase/Classes/Persistence/Generic/Query.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
typo3/sysext/extbase/Classes/Property/PropertyMapper.php
typo3/sysext/extbase/Classes/Property/TypeConverter/PersistentObjectConverter.php
typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Controller/BlogController.php
typo3/sysext/extbase/Tests/Unit/Mvc/Cli/RequestBuilderTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Controller/CommandControllerTest.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/PersistentObjectConverterTest.php
typo3/sysext/extbase/Tests/Unit/Reflection/ObjectAccessTest.php
typo3/sysext/extbase/Tests/Unit/Scheduler/TaskTest.php
typo3/sysext/extensionmanager/Classes/Controller/ConfigurationController.php
typo3/sysext/extensionmanager/Classes/Controller/UploadExtensionFileController.php
typo3/sysext/extensionmanager/Classes/Domain/Model/Dependency.php
typo3/sysext/extensionmanager/Classes/Utility/Importer/ExtensionListUtility.php
typo3/sysext/extensionmanager/Classes/Utility/Importer/MirrorListUtility.php
typo3/sysext/extensionmanager/Classes/Utility/Parser/ExtensionXmlPullParser.php
typo3/sysext/extensionmanager/Tests/Unit/Controller/DownloadControllerTest.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php
typo3/sysext/fluid/Classes/ViewHelpers/SwitchViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/CategoriesViewHelper.php
typo3/sysext/form/Classes/Domain/Builder/FormBuilder.php
typo3/sysext/form/Classes/Domain/Builder/ValidationBuilder.php
typo3/sysext/frontend/Classes/Controller/ShowImageController.php
typo3/sysext/install/Classes/Service/SqlExpectedSchemaService.php
typo3/sysext/install/Classes/Updates/FrontendUserImageUpdateWizard.php
typo3/sysext/install/Tests/Unit/Service/SilentConfigurationUpgradeServiceTest.php
typo3/sysext/recycler/Tests/Functional/Recycle/AbstractRecycleTestCase.php
typo3/sysext/recycler/Tests/Unit/Task/CleanerTaskTest.php
typo3/sysext/rtehtmlarea/Classes/Controller/SelectImageController.php
typo3/sysext/scheduler/Classes/Example/TestTask.php
typo3/sysext/workspaces/Classes/Domain/Record/AbstractRecord.php
typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.php
typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php
typo3/sysext/workspaces/Classes/ExtDirect/MassActionHandler.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php
typo3/sysext/workspaces/Classes/Service/StagesService.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index b765cc0..632eba3 100644 (file)
@@ -8,7 +8,7 @@ matrix:
 
   include:
     - php: 7
-      env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes ACCEPTANCE_TESTS=no JSUNIT_TESTS=yes PHP_LINT=yes XLF_CHECK=yes SUBMODULE_TEST=yes  EXCEPTIONCODE_TEST=yes
+      env: UNIT_TESTS=yes FUNCTIONAL_TESTS=yes ACCEPTANCE_TESTS=no JSUNIT_TESTS=yes PHP_LINT=yes XLF_CHECK=yes SUBMODULE_TEST=yes
 
 sudo: false
 
@@ -105,8 +105,3 @@ script:
         fi
       "
     fi
-
-  - >
-    if [[ "$EXCEPTIONCODE_TEST" == "yes" ]]; then
-      ./typo3/sysext/core/Build/Scripts/duplicateExceptionCodeCheck.sh
-    fi
\ No newline at end of file
index 45fc295..84548b0 100644 (file)
@@ -127,9 +127,9 @@ class CliRequestHandler implements RequestHandlerInterface
     {
         $cliKey = $input->getFirstArgument();
         if (empty($cliKey)) {
-            throw new \InvalidArgumentException('This script must have a command as first argument.', 1);
+            throw new \InvalidArgumentException('This script must have a command as first argument.', 1476107418);
         } elseif (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$cliKey])) {
-            throw new \InvalidArgumentException('This supplied command is not valid.', 1);
+            throw new \InvalidArgumentException('This supplied command is not valid.', 1476107480);
         }
         return $cliKey;
     }
@@ -167,18 +167,18 @@ class CliRequestHandler implements RequestHandlerInterface
     protected function loadCommandLineBackendUser($commandLineName)
     {
         if ($GLOBALS['BE_USER']->user['uid']) {
-            throw new \RuntimeException('Another user was already loaded which is impossible in CLI mode!', 3);
+            throw new \RuntimeException('Another user was already loaded which is impossible in CLI mode!', 1476107444);
         }
         if (!StringUtility::beginsWith($commandLineName, '_CLI_')) {
-            throw new \RuntimeException('Module name, "' . $commandLineName . '", was not prefixed with "_CLI_"', 3);
+            throw new \RuntimeException('Module name, "' . $commandLineName . '", was not prefixed with "_CLI_"', 1476107445);
         }
         $userName = strtolower($commandLineName);
         $GLOBALS['BE_USER']->setBeUserByName($userName);
         if (!$GLOBALS['BE_USER']->user['uid']) {
-            throw new \RuntimeException('No backend user named "' . $userName . '" was found!', 3);
+            throw new \RuntimeException('No backend user named "' . $userName . '" was found!', 1476107195);
         }
         if ($GLOBALS['BE_USER']->isAdmin()) {
-            throw new \RuntimeException('CLI backend user "' . $userName . '" was ADMIN which is not allowed!', 3);
+            throw new \RuntimeException('CLI backend user "' . $userName . '" was ADMIN which is not allowed!', 1476107446);
         }
     }
 
index e3fa473..5bad23a 100644 (file)
@@ -169,7 +169,7 @@ class EditFileController extends AbstractModule
         $extList = $GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'];
         try {
             if (!$extList || !GeneralUtility::inList($extList, $this->fileObject->getExtension())) {
-                throw new \Exception('Files with that extension are not editable.');
+                throw new \Exception('Files with that extension are not editable.', 1476050135);
             }
 
             // Read file content to edit:
index 4f038d3..fc5c1ed 100644 (file)
@@ -70,7 +70,7 @@ class UriBuilder
     {
         $this->loadBackendRoutes();
         if (!isset($this->routes[$name])) {
-            throw new RouteNotFoundException('Unable to generate a URL for the named route "' . $name . '" because this route was not found.');
+            throw new RouteNotFoundException('Unable to generate a URL for the named route "' . $name . '" because this route was not found.', 1476050190);
         }
 
         $route = $this->routes[$name];
index e400484..96e9b11 100644 (file)
@@ -918,7 +918,7 @@ class ConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function matchCallsTestConditionAndHandsOverParameters()
     {
         $this->expectException(TestConditionException::class);
-        $this->expectExceptionCode(1411581139);
+        $this->expectExceptionCode(1476109533);
         $this->matchCondition->match('[TYPO3\\CMS\\Backend\\Tests\\Unit\\Configuration\\TypoScript\\ConditionMatching\\Fixtures\\TestCondition = 7, != 6]');
     }
 }
index c1b0432..a3a6acb 100644 (file)
@@ -30,7 +30,7 @@ class TestCondition extends \TYPO3\CMS\Core\Configuration\TypoScript\ConditionMa
     {
         // Throw an exception if everything is fine, this exception is *expected* in the according unit test
         if ($conditionParameters[0] === '= 7' && $conditionParameters[1] === '!= 6') {
-            throw new TestConditionException('All Ok', 1411581139);
+            throw new TestConditionException('All Ok', 1476109533);
         }
     }
 }
index 0eb3574..3c74483 100644 (file)
@@ -247,7 +247,7 @@ class TcaCheckboxItemsTest extends UnitTestCase
                                     || $parameters['field'] !== 'aField'
                                     || $parameters['flexParentDatabaseRow']['aParentDatabaseRowFieldName'] !== 'aParentDatabaseRowFieldValue'
                                 ) {
-                                    throw new \UnexpectedValueException('broken', 1438604329);
+                                    throw new \UnexpectedValueException('broken', 1476109402);
                                 }
                             },
                         ],
index 68b03fa..e36fb03 100644 (file)
@@ -290,7 +290,7 @@ class TcaRadioItemsTest extends UnitTestCase
                                     || $parameters['row'] !== [ 'aField' => 'aValue' ]
                                     || $parameters['field'] !== 'aField'
                                 ) {
-                                    throw new \UnexpectedValueException('broken', 1438604329);
+                                    throw new \UnexpectedValueException('broken', 1476109434);
                                 }
                             },
                         ],
@@ -352,7 +352,7 @@ class TcaRadioItemsTest extends UnitTestCase
                                 ],
                             ],
                             'itemsProcFunc' => function (array $parameters, $pObj) {
-                                throw new \UnexpectedValueException('anException', 1438604329);
+                                throw new \UnexpectedValueException('anException', 1476109435);
                             },
                         ],
                     ],
index 35ce77c..6a53c28 100644 (file)
@@ -1857,8 +1857,8 @@ class TcaSelectItemsTest extends UnitTestCase
         $queryBuilderProphet->andWhere(' 1=1')->shouldBeCalled()->willReturn($queryBuilderProphet->reveal());
         $queryBuilderProphet->andWhere('`pages.uid` = `fTable.pid`')->shouldBeCalled()->willReturn($queryBuilderProphet->reveal());
 
-        $prevException = new DBALException('Invalid table name', 400);
-        $exception = new DBALException('Driver error', 500, $prevException);
+        $prevException = new DBALException('Invalid table name', 1476045274);
+        $exception = new DBALException('Driver error', 1476045971, $prevException);
 
         $queryBuilderProphet->execute()->shouldBeCalled()->willThrow($exception);
 
@@ -2679,7 +2679,7 @@ class TcaSelectItemsTest extends UnitTestCase
                                     || $parameters['row'] !== [ 'aField' => 'aValue' ]
                                     || $parameters['field'] !== 'aField'
                                 ) {
-                                    throw new \UnexpectedValueException('broken', 1438604329);
+                                    throw new \UnexpectedValueException('broken', 1476109436);
                                 }
                             },
                         ],
@@ -2742,7 +2742,7 @@ class TcaSelectItemsTest extends UnitTestCase
                                 ],
                             ],
                             'itemsProcFunc' => function (array $parameters, $pObj) {
-                                throw new \UnexpectedValueException('anException', 1438604329);
+                                throw new \UnexpectedValueException('anException', 1476109437);
                             },
                         ],
                     ],
index a6beaaf..8fda8c2 100755 (executable)
@@ -3,50 +3,84 @@
 #########################
 #
 # Find duplicate exception timestamps and list them.
-# It expects to be run from the core root.
+# Additionally find exceptions that have no exception code.
 #
-# The script searches for duplicate timestamps with
-# two exceptions:
-# 1. timestamps defined by the "IGNORE" array
-# 2. timestamps within Tests directories
+# It expects to be run from the core root.
 #
 ##########################
 
 cd typo3/
 
-# Array of timestamps which are allowed to be non-unique
-IGNORE=("1270853884")
-
-# The ack / ack-grep command can be different for different OS
-ACK=${ACK:-ack-grep}
+ignoreFiles=()
+# auto generated file, shouldn't be checked
+ignoreFiles+="sysext/core/Build/Configuration/Acceptance/Support/_generated/AcceptanceTesterActions.php"
+# a exception in here throws up an code from a previous exception
+ignoreFiles+="sysext/extbase/Classes/Core/Bootstrap.php"
 
-# Respect only php files and ignore files within a "Tests" directory
-EXCEPTIONS=$(${ACK} --type php --ignore-dir Tests 'throw new' -A5 0>&- | grep '[[:digit:]]\{10\}')
+foundNewFile=0
+oldFilename=""
+firstLineOfMatch=""
+foundExceptionInFile=1
+exceptionCodes=()
 
-DUPLICATES=$(echo ${EXCEPTIONS} | awk '{
-    for(i=1; i<=NF; i++) {
-        if(match($i, /[0-9]{10}/)) {
-            print $i
-        }
-    }
-}' | cut -d';' -f1 | tr -cd '0-9\012' | sort | uniq -d)
-
-COUNTER=0
+# grep
+# '-r' recursive
+# '--include '*.php'' in all .php files
+# '-Pzoab' pcre regex, -zo remove all linebreaks for multiline match, treat all files as text, output position "filename:position: match", binary position
+#
+# (?:(?!Exception\()[\w\\])*  negative lookahead. capture all alphanum and \ until we reach "Exception("
+# eat "Exception("
+# (?:(?!\);).|[\r\n])*\);[\r\n]+   negative lookahead again, eat everything including a \n until we reach the first ");", then line breaks
 
-for CODE in ${DUPLICATES}; do
+grep \
+    -r \
+    --include '*.php' \
+    -Pzoab \
+    'new (?:(?!Exception\()[\w\\])*Exception\((?:(?!\);).|[\r\n])*\);[\r\n]+' \
+    | \
+while read line;
+do
+    possibleFilename=`echo ${line} | cut -d':' -f1`
+    if [[ ${possibleFilename} =~ .php$ ]]; then
+        # the matched line consists of a file name match, we're dealing with a new match here.
+        foundNewFile=1
+        oldFilename=${currentFilename}
+        currentFilename=${possibleFilename}
+    else
+        foundNewFile=0
+    fi
 
-    # Ignore timestamps which are defined by the "IGNORE" array
-    if [ ${IGNORE[@]} != ${CODE} ] ; then
-        echo "Possible duplicate exception code $CODE": ${ACK} --type php ${CODE}
-        COUNTER=$((COUNTER+1))
+    # skip file if in blacklist
+    if [[ {$ignoreFiles[@]} =~ ${currentFilename} ]]; then
+        continue
     fi
 
-done
+    # check for match in previous file name
+    if [[ ${foundNewFile} -eq 1 ]] && [[ ${foundExceptionInFile} -eq 0 ]]; then
+        echo "File: $oldFilename"
+        echo "The created exception contains no 10 digit exception code as second argument, in or below this line:"
+        echo "$firstLineOfMatch"
+        exit 1
+    fi
 
-if [ ${COUNTER} -gt 0 ] ; then
-    echo "$COUNTER possible duplicate exception codes found."
-    exit 1
-fi
+    # reset found flag if we're handling new file
+    if [[ ${foundNewFile} -eq 1 ]]; then
+        foundExceptionInFile=0
+        firstLineOfMatch=${line}
+    fi
 
-exit 0
+    # see if the line consists of an exception code
+    if [[ "$line" =~ .*([0-9]{10}).* ]]; then
+        foundExceptionInFile=1
+        exceptionCode=${BASH_REMATCH[1]}
+        # check if that code was registered already
+        if [[ {$exceptionCodes[@]} =~ ${exceptionCode} ]]; then
+            echo "Duplicate exception code ${exceptionCode} in file:"
+            echo ${currentFilename}
+            exit 1
+        fi
+        exceptionCodes+=${exceptionCode}
+    fi
+done || exit 1
 
+exit 0
\ No newline at end of file
index ed2eb7c..d85124e 100644 (file)
@@ -370,7 +370,7 @@ abstract class AbstractUserAuthentication
     {
         // Backend or frontend login - used for auth services
         if (empty($this->loginType)) {
-            throw new Exception('No loginType defined, should be set explicitly by subclass');
+            throw new Exception('No loginType defined, should be set explicitly by subclass', 1476045345);
         }
         // Enable dev logging if set
         if ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['writeDevLog']) {
index 3680bb0..4d267db 100644 (file)
@@ -152,7 +152,10 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                 }
             }
             if (!$cacheDirectoryInBaseDir) {
-                throw new \TYPO3\CMS\Core\Cache\Exception('Open_basedir restriction in effect. The directory "' . $cacheDirectory . '" is not in an allowed path.');
+                throw new \TYPO3\CMS\Core\Cache\Exception(
+                    'Open_basedir restriction in effect. The directory "' . $cacheDirectory . '" is not in an allowed path.',
+                    1476045417
+                );
             }
         } else {
             if ($cacheDirectory[0] == '/') {
index 2dfd3df..5ae7a6c 100644 (file)
@@ -96,7 +96,7 @@ class CommandRequestHandler implements RequestHandlerInterface
 
         $GLOBALS['BE_USER']->setBeUserByName($userName);
         if (!$GLOBALS['BE_USER']->user['uid']) {
-            throw new \RuntimeException('No backend user named "' . $userName . '" was found!', 3);
+            throw new \RuntimeException('No backend user named "' . $userName . '" was found!', 1476107260);
         }
 
         $this->bootstrap
index 94ee4af..f709e88 100644 (file)
@@ -654,7 +654,10 @@ class Bootstrap
                 break;
             default:
                 // Throw exception if an invalid option is set.
-                throw new \RuntimeException('The option $TYPO3_CONF_VARS[SYS][displayErrors] is not set to "-1", "0" or "1".');
+                throw new \RuntimeException(
+                    'The option $TYPO3_CONF_VARS[SYS][displayErrors] is not set to "-1", "0" or "1".',
+                    1476046290
+                );
         }
         @ini_set('display_errors', $displayErrors);
 
index c38982e..00e3ff0 100644 (file)
@@ -133,13 +133,15 @@ class BulkInsertQuery
 
             if (!$namedValue && !$positionalValue) {
                 throw new \InvalidArgumentException(
-                    sprintf('No value specified for column %s (index %d).', $column, $index)
+                    sprintf('No value specified for column %s (index %d).', $column, $index),
+                    1476049651
                 );
             }
 
             if ($namedValue && $positionalValue && $values[$column] !== $values[$index]) {
                 throw new \InvalidArgumentException(
-                    sprintf('Multiple values specified for column %s (index %d).', $column, $index)
+                    sprintf('Multiple values specified for column %s (index %d).', $column, $index),
+                    1476049652
                 );
             }
 
@@ -151,7 +153,8 @@ class BulkInsertQuery
 
             if ($namedType && $positionalType && $types[$column] !== $types[$index]) {
                 throw new \InvalidArgumentException(
-                    sprintf('Multiple types specified for column %s (index %d).', $column, $index)
+                    sprintf('Multiple types specified for column %s (index %d).', $column, $index),
+                    1476049653
                 );
             }
 
@@ -192,7 +195,8 @@ class BulkInsertQuery
                     'You can only insert %d rows in a single INSERT statement with platform "%s".',
                     $insertMaxRows,
                     $platform->getName()
-                )
+                ),
+                1476049654
             );
         }
 
@@ -244,7 +248,10 @@ class BulkInsertQuery
     public function getSQL(): string
     {
         if (empty($this->values)) {
-            throw new \LogicException('You need to add at least one set of values before generating the SQL.');
+            throw new \LogicException(
+                'You need to add at least one set of values before generating the SQL.',
+                1476049702
+            );
         }
 
         $connection = $this->connection;
index 0d397a6..7b70bc8 100644 (file)
@@ -110,7 +110,7 @@ class ErrorHandler implements ErrorHandlerInterface
                     'line ' . $errorLine;
                 die($message);
             }
-            throw new Exception($message, 1);
+            throw new Exception($message, 1476107295);
         } else {
             switch ($errorLevel) {
                 case E_USER_ERROR:
index 0c06e4f..31d32b9 100644 (file)
@@ -81,7 +81,7 @@ class ExtDirectRouter
                 }
                 try {
                     if (!$validToken) {
-                        throw new \TYPO3\CMS\Core\FormProtection\Exception('ExtDirect: Invalid Security Token!');
+                        throw new \TYPO3\CMS\Core\FormProtection\Exception('ExtDirect: Invalid Security Token!', 1476046324);
                     }
                     $extResponse[$index]['type'] = 'rpc';
                     $extResponse[$index]['result'] = $this->processRpc($singleRequest, $namespace);
index 16e6b3d..75b1b0a 100644 (file)
@@ -413,7 +413,10 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver
                 if ($result === -1) {
                     return false;
                 } elseif ($result === false) {
-                    throw new \RuntimeException('Could not apply file/folder name filter ' . $filter[0] . '::' . $filter[1]);
+                    throw new \RuntimeException(
+                        'Could not apply file/folder name filter ' . $filter[0] . '::' . $filter[1],
+                        1476046425
+                    );
                 }
             }
         }
@@ -680,7 +683,7 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver
             case 'folder_hash':
                 return $this->hashIdentifier($this->getParentFolderIdentifierOfIdentifier($identifier));
             default:
-                throw new \InvalidArgumentException(sprintf('The information "%s" is not available.', $property));
+                throw new \InvalidArgumentException(sprintf('The information "%s" is not available.', $property), 1476047422);
         }
     }
 
@@ -771,7 +774,10 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver
             $result = copy($localFilePath, $targetPath);
         }
         if ($result === false || !file_exists($targetPath)) {
-            throw new \RuntimeException('Adding file ' . $localFilePath . ' at ' . $newFileIdentifier . ' failed.');
+            throw new \RuntimeException(
+                'Adding file ' . $localFilePath . ' at ' . $newFileIdentifier . ' failed.',
+                1476046453
+            );
         }
         clearstatcache();
         // Change the permissions of the file
index 8d7e589..56a86e9 100644 (file)
@@ -57,7 +57,7 @@ class TaskTypeRegistry implements \TYPO3\CMS\Core\SingletonInterface
     {
         $taskClass = $this->getClassForTaskType($taskType);
         if ($taskClass === null) {
-            throw new \RuntimeException('Unknown processing task "' . $taskType . '"');
+            throw new \RuntimeException('Unknown processing task "' . $taskType . '"', 1476049767);
         }
 
         return GeneralUtility::makeInstance($taskClass, $processedFile, $processingConfiguration);
index 8797b5e..eaa191d 100644 (file)
@@ -2028,7 +2028,7 @@ class ResourceStorage implements ResourceStorageInterface
      */
     protected function moveFolderBetweenStorages(Folder $folderToMove, Folder $targetParentFolder, $newFolderName)
     {
-        throw new \RuntimeException('Not yet implemented');
+        throw new \RuntimeException('Not yet implemented', 1476046361);
     }
 
     /**
@@ -2085,7 +2085,7 @@ class ResourceStorage implements ResourceStorageInterface
      */
     protected function copyFolderBetweenStorages(Folder $folderToCopy, Folder $targetParentFolder, $newFolderName)
     {
-        throw new \RuntimeException('Not yet implemented.');
+        throw new \RuntimeException('Not yet implemented.', 1476046386);
     }
 
     /**
index 8db6c29..38f5dec 100644 (file)
@@ -188,7 +188,7 @@ abstract class BaseTestCase extends \PHPUnit_Framework_TestCase
                                 'break;' .
                             'default:' .
                                 'throw new \InvalidArgumentException(' .
-                                    '\'_callRef currently only allows calls to methods with no more than 9 parameters.\'' .
+                                    '\'_callRef currently only allows calls to methods with no more than 9 parameters.\', 1476049901' .
                                 ');' .
                         '}' .
                         'return $returnValue;' .
@@ -261,7 +261,7 @@ abstract class BaseTestCase extends \PHPUnit_Framework_TestCase
     protected function inject($target, $name, $dependency)
     {
         if (!is_object($target)) {
-            throw new \InvalidArgumentException('Wrong type for argument $target, must be object.');
+            throw new \InvalidArgumentException('Wrong type for argument $target, must be object.', 1476107338);
         }
 
         $objectReflection = new \ReflectionObject($target);
@@ -277,7 +277,10 @@ abstract class BaseTestCase extends \PHPUnit_Framework_TestCase
             $property->setAccessible(true);
             $property->setValue($target, $dependency);
         } else {
-            throw new \RuntimeException('Could not inject ' . $name . ' into object of type ' . get_class($target));
+            throw new \RuntimeException(
+                'Could not inject ' . $name . ' into object of type ' . get_class($target),
+                1476107339
+            );
         }
     }
 
index 0ff5d49..129f315 100644 (file)
@@ -284,7 +284,7 @@ class Testbase
             if (!file_exists($sourcePath)) {
                 throw new Exception(
                     'Path ' . $sourcePath . ' not found',
-                    1376745645
+                    1476109221
                 );
             }
             $destinationPath = $instancePath . '/' . ltrim($destinationPathToLinkInTestInstance, '/');
index 11c7044..7b5c59e 100644 (file)
@@ -154,7 +154,8 @@ class ExtendedFileUtility extends BasicFileUtility
                     'Invalid argument, received: "%s", expected a value from enumeration \TYPO3\CMS\Core\Resource\DuplicationBehavior (%s)',
                     $existingFilesConflictMode,
                     implode(', ', DuplicationBehavior::getConstants())
-                )
+                ),
+                1476046229
             );
         }
     }
index 51da246..b98430c 100644 (file)
@@ -67,7 +67,8 @@ class ClassMapGenerator
             } else {
                 throw new \RuntimeException(
                     'Could not scan for classes inside "' . $path .
-                    '" which does not appear to be a file nor a folder'
+                    '" which does not appear to be a file nor a folder',
+                    1476049953
                 );
             }
         }
@@ -125,14 +126,14 @@ class ClassMapGenerator
             $contents = @php_strip_whitespace($path);
             if (!$contents) {
                 if (!file_exists($path)) {
-                    throw new \Exception('File does not exist');
+                    throw new \Exception('File does not exist', 1476049981);
                 }
                 if (!is_readable($path)) {
-                    throw new \Exception('File is not readable');
+                    throw new \Exception('File is not readable', 1476049990);
                 }
             }
         } catch (\Exception $e) {
-            throw new \RuntimeException('Could not scan for classes inside ' . $path . ": \n" . $e->getMessage(), 0, $e);
+            throw new \RuntimeException('Could not scan for classes inside ' . $path . ": \n" . $e->getMessage(), 1476050009, $e);
         }
 
         // return early if there is no chance of matching anything in this file
index 571fe09..c0dfc20 100644 (file)
@@ -347,7 +347,7 @@ class ActionService
                 $versionedUid = $this->getVersionedId($tableName, $liveUid);
                 if (empty($versionedUid)) {
                     if ($throwException) {
-                        throw new \TYPO3\CMS\Core\Tests\Exception('Versioned UID could not be determined');
+                        throw new \TYPO3\CMS\Core\Tests\Exception('Versioned UID could not be determined', 1476049592);
                     } else {
                         continue;
                     }
index 6caa442..c49eb9a 100644 (file)
@@ -53,7 +53,7 @@ class DataSet
     protected static function readData($fileName)
     {
         if (!file_exists($fileName)) {
-            throw new \RuntimeException('File "' . $fileName . '" does not exist');
+            throw new \RuntimeException('File "' . $fileName . '" does not exist', 1476049619);
         }
 
         $rawData = [];
index 209e1b0..a1c79ff 100644 (file)
@@ -36,7 +36,8 @@ abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\Acti
             parent::processRequest($request, $response);
         } catch (\TYPO3\CMS\Extbase\Property\Exception $exception) {
             throw new \RuntimeException(
-                $this->getRuntimeIdentifier() . ': ' . $exception->getMessage() . ' (' . $exception->getCode() . ')'
+                $this->getRuntimeIdentifier() . ': ' . $exception->getMessage() . ' (' . $exception->getCode() . ')',
+                1476049553
             );
         }
     }
index 3f3319b..8088ec9 100644 (file)
@@ -70,6 +70,6 @@ class ResponseContent
             return $this->sections[$sectionIdentifier];
         }
 
-        throw new \RuntimeException('ResponseSection "' . $sectionIdentifier . '" does not exist');
+        throw new \RuntimeException('ResponseSection "' . $sectionIdentifier . '" does not exist', 1476122151);
     }
 }
index ec65caf..c841012 100644 (file)
@@ -311,7 +311,7 @@ class CacheManagerTest extends UnitTestCase
         $manager->_set('defaultCacheConfiguration', $defaultCacheConfiguration);
         $manager->setCacheConfigurations($configuration);
         $this->expectException(\RuntimeException::class);
-        $this->expectExceptionCode(1464555650);
+        $this->expectExceptionCode(1476109149);
         $manager->getCache($cacheIdentifier);
     }
 
index 3ed4f39..11a5dc3 100644 (file)
@@ -21,6 +21,6 @@ class FrontendDefaultFixture extends FrontendFixture
 {
     public function __construct()
     {
-        throw new \RuntimeException('', 1464555650);
+        throw new \RuntimeException('', 1476109149);
     }
 }
index 57905b0..43a37d6 100644 (file)
@@ -41,7 +41,7 @@ class DebugExceptionHandlerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function echoExceptionWebEscapesExceptionMessage()
     {
         $message = '<b>b</b><script>alert(1);</script>';
-        $exception = new \Exception($message);
+        $exception = new \Exception($message, 1476049363);
         ob_start();
         $this->subject->echoExceptionWeb($exception);
         $output = ob_get_contents();
index 9ab744b..cadc94c 100644 (file)
@@ -42,7 +42,7 @@ class ProductionExceptionHandlerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function echoExceptionWebEscapesExceptionMessage()
     {
         $message = '<b>b</b><script>alert(1);</script>';
-        $exception = new \Exception($message);
+        $exception = new \Exception($message, 1476049364);
         ob_start();
         $this->subject->echoExceptionWeb($exception);
         $output = ob_get_contents();
index b8485c2..2580aa5 100644 (file)
@@ -79,7 +79,7 @@ class LocalizationFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $localizationFactory->_set('cacheInstance', $cacheInstance);
         $languageStore->method('hasData')->willReturn(false);
         $languageStore->method('getData')->willReturn([]);
-        $languageStore->method('setConfiguration')->willThrowException(new \TYPO3\CMS\Core\Localization\Exception\FileNotFoundException());
+        $languageStore->method('setConfiguration')->willThrowException(new \TYPO3\CMS\Core\Localization\Exception\FileNotFoundException('testing', 1476049512));
         $cacheInstance->method('get')->willReturn(false);
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'] = ['foo' => 'bar'];
 
index 3117382..2901c4a 100644 (file)
@@ -28,6 +28,6 @@ class WriterFailing implements \TYPO3\CMS\Core\Log\Writer\WriterInterface
      */
     public function writeLog(\TYPO3\CMS\Core\Log\LogRecord $record)
     {
-        throw new \RuntimeException('t3lib_log_writer_Failing failed');
+        throw new \RuntimeException('t3lib_log_writer_Failing failed', 1476122125);
     }
 }
index 60b2bcc..47b22f3 100644 (file)
@@ -14,21 +14,24 @@ namespace TYPO3\CMS\Core\Tests\Unit\Log;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Log\LogRecord;
+use TYPO3\CMS\Core\Tests\UnitTestCase;
+
 /**
  * Test case
  */
-class LogRecordTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
+class LogRecordTest extends UnitTestCase
 {
     /**
      * Returns a \TYPO3\CMS\Core\Log\LogRecord
      *
      * @param array $parameters Parameters to set in \TYPO3\CMS\Core\Log\LogRecord constructor.
-     * @return \TYPO3\CMS\Core\Log\LogRecord
+     * @return LogRecord
      */
     protected function getRecord(array $parameters = [])
     {
-        /** @var $record \TYPO3\CMS\Core\Log\LogRecord */
-        $record = new \TYPO3\CMS\Core\Log\LogRecord($parameters['component'] ?: 'test.core.log', $parameters['level'] ?: \TYPO3\CMS\Core\Log\LogLevel::DEBUG, $parameters['message'] ?: 'test message', $parameters['data'] ?: []);
+        /** @var $record LogRecord */
+        $record = new LogRecord($parameters['component'] ?: 'test.core.log', $parameters['level'] ?: \TYPO3\CMS\Core\Log\LogLevel::DEBUG, $parameters['message'] ?: 'test message', $parameters['data'] ?: []);
         return $record;
     }
 
@@ -145,8 +148,8 @@ class LogRecordTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $level = \TYPO3\CMS\Core\Log\LogLevel::DEBUG;
         $message = 'test message';
         $data = ['foo' => 'bar'];
-        /** @var $record \TYPO3\CMS\Core\Log\LogRecord */
-        $record = new \TYPO3\CMS\Core\Log\LogRecord($component, $level, $message, $data);
+        /** @var $record LogRecord */
+        $record = new LogRecord($component, $level, $message, $data);
         $recordArray = $record->toArray();
         $this->assertEquals($component, $recordArray['component']);
         $this->assertEquals($level, $recordArray['level']);
@@ -169,7 +172,7 @@ class LogRecordTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
      */
     public function toStringIncludesExceptionDataAsJson()
     {
-        $dataArray = ['exception' => new \Exception('foo')];
+        $dataArray = ['exception' => new \Exception('foo', 1476049451)];
         $record = $this->getRecord(['data' => $dataArray]);
         $this->assertContains('Exception: foo', (string)$record);
     }
index e219ff6..e419cd7 100644 (file)
@@ -1297,7 +1297,11 @@ class LocalDriverTest extends \TYPO3\CMS\Core\Tests\Unit\Resource\BaseTestCase
             ]
         ]);
         $subject = $this->createDriver([], ['createIdentifierMap']);
-        $subject->expects($this->atLeastOnce())->method('createIdentifierMap')->will($this->throwException(new \TYPO3\CMS\Core\Resource\Exception\FileOperationErrorException()));
+        $subject->expects($this->atLeastOnce())->method('createIdentifierMap')->will(
+            $this->throwException(
+                new \TYPO3\CMS\Core\Resource\Exception\FileOperationErrorException('testing', 1476045666)
+            )
+        );
         $subject->renameFolder('/sourceFolder/', 'newFolder');
         $this->assertFileExists($this->getUrlInMount('/sourceFolder/file'));
     }
index 7754a46..e6eaaa7 100644 (file)
@@ -31,8 +31,8 @@ class GeneralUtilityMinifyJavaScriptFixture extends GeneralUtility
     public static function devLog($errorMessage, $extKey, $severity = 0, $dataVar = false)
     {
         if ($errorMessage !== 'Error minifying java script: foo') {
-            throw new \UnexpectedValueException('broken');
+            throw new \UnexpectedValueException('broken', 1476122080);
         }
-        throw new \RuntimeException();
+        throw new \RuntimeException('testing', 1476122081);
     }
 }
index 05e6298..b284055 100644 (file)
@@ -288,7 +288,7 @@ abstract class AbstractController implements ControllerInterface
         if ($arguments !== null) {
             $this->request->setArguments($arguments);
         }
-        throw new StopActionException();
+        throw new StopActionException('forward', 1476045801);
     }
 
     /**
@@ -355,7 +355,7 @@ abstract class AbstractController implements ControllerInterface
             $this->response->setStatus($statusCode);
             $this->response->setHeader('Location', (string)$uri);
         }
-        throw new StopActionException();
+        throw new StopActionException('redirectToUri', 1476045828);
     }
 
     /**
@@ -393,7 +393,7 @@ abstract class AbstractController implements ControllerInterface
             }
         }
         $this->response->setContent($content);
-        throw new StopActionException();
+        throw new StopActionException('throwStatus', 1476045871);
     }
 
     /**
index 431b19f..24c3723 100644 (file)
@@ -229,7 +229,7 @@ class CommandController implements CommandControllerInterface
         $this->request->setArguments($arguments);
 
         $this->arguments->removeAll();
-        throw new StopActionException();
+        throw new StopActionException('forward', 1476107661);
     }
 
     /**
@@ -344,7 +344,7 @@ class CommandController implements CommandControllerInterface
     protected function quit($exitCode = 0)
     {
         $this->response->setExitCode($exitCode);
-        throw new StopActionException;
+        throw new StopActionException('quit', 1476107681);
     }
 
     /**
index 1a70d81..f4d0a90 100644 (file)
@@ -114,7 +114,10 @@ class Dispatcher implements \TYPO3\CMS\Core\SingletonInterface
         $controllerObjectName = $request->getControllerObjectName();
         $controller = $this->objectManager->get($controllerObjectName);
         if (!$controller instanceof \TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface) {
-            throw new \TYPO3\CMS\Extbase\Mvc\Exception\InvalidControllerException('Invalid controller "' . $request->getControllerObjectName() . '". The controller must implement the TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerInterface.', 1202921619);
+            throw new \TYPO3\CMS\Extbase\Mvc\Exception\InvalidControllerException(
+                'Invalid controller "' . $request->getControllerObjectName() . '". The controller must implement the TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerInterface.',
+                1476109646
+            );
         }
         return $controller;
     }
index e457061..26980ea 100644 (file)
@@ -92,7 +92,10 @@ class ClassInfoFactory
                     $reflectionParameter = $reflectionMethod->getParameters();
                     if (isset($reflectionParameter[0])) {
                         if (!$reflectionParameter[0]->getClass()) {
-                            throw new \Exception('Method "' . $reflectionMethod->getName() . '" of class "' . $reflectedClass->getName() . '" is marked as setter for Dependency Injection, but does not have a type annotation');
+                            throw new \Exception(
+                                'Method "' . $reflectionMethod->getName() . '" of class "' . $reflectedClass->getName() . '" is marked as setter for Dependency Injection, but does not have a type annotation',
+                                1476108030
+                            );
                         }
                         $result[$reflectionMethod->getName()] = $reflectionParameter[0]->getClass()->getName();
                     }
index 344aa29..ab0e9a9 100644 (file)
@@ -309,7 +309,7 @@ class Container implements \TYPO3\CMS\Core\SingletonInterface
                 } elseif (array_key_exists('defaultValue', $argumentInformation)) {
                     $parameter = $argumentInformation['defaultValue'];
                 } else {
-                    throw new \InvalidArgumentException('not a correct info array of constructor dependencies was passed!');
+                    throw new \InvalidArgumentException('not a correct info array of constructor dependencies was passed!', 1476107941);
                 }
             }
             $parameters[] = $parameter;
index 3708589..bff27f9 100644 (file)
@@ -116,7 +116,10 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface
     protected function buildDataMapInternal($className)
     {
         if (!class_exists($className)) {
-            throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidClassException('Could not find class definition for name "' . $className . '". This could be caused by a mis-spelling of the class name in the class definition.');
+            throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidClassException(
+                'Could not find class definition for name "' . $className . '". This could be caused by a mis-spelling of the class name in the class definition.',
+                1476045117
+            );
         }
         $recordType = null;
         $subclasses = [];
index 5f5e756..cbc0d6c 100644 (file)
@@ -255,7 +255,7 @@ class PersistenceManager implements \TYPO3\CMS\Extbase\Persistence\PersistenceMa
      */
     public function injectSettings(array $settings)
     {
-        throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__);
+        throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__, 1476108078);
     }
 
     /**
@@ -326,7 +326,7 @@ class PersistenceManager implements \TYPO3\CMS\Extbase\Persistence\PersistenceMa
      */
     public function convertObjectToIdentityArray($object)
     {
-        throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__);
+        throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__, 1476108103);
     }
 
     /**
@@ -341,7 +341,7 @@ class PersistenceManager implements \TYPO3\CMS\Extbase\Persistence\PersistenceMa
      */
     public function convertObjectsToIdentityArrays(array $array)
     {
-        throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__);
+        throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__, 1476108111);
     }
 
     /**
index 38463df..65d4358 100644 (file)
@@ -646,6 +646,6 @@ class Query implements QueryInterface
      */
     public function isEmpty($propertyName)
     {
-        throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__);
+        throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__, 1476122265);
     }
 }
index 61bca6c..9395881 100644 (file)
@@ -166,7 +166,7 @@ class Typo3DbBackend implements BackendInterface, SingletonInterface
     public function updateRow($tableName, array $fieldValues, $isRelation = false)
     {
         if (!isset($fieldValues['uid'])) {
-            throw new \InvalidArgumentException('The given row must contain a value for "uid".');
+            throw new \InvalidArgumentException('The given row must contain a value for "uid".', 1476045164);
         }
 
         $uid = (int)$fieldValues['uid'];
index 1e921c1..94a1b08 100644 (file)
@@ -168,7 +168,10 @@ class PropertyMapper implements \TYPO3\CMS\Core\SingletonInterface
         $targetType = $typeConverter->getTargetTypeForSource($source, $targetType, $configuration);
 
         if (!is_object($typeConverter) || !$typeConverter instanceof \TYPO3\CMS\Extbase\Property\TypeConverterInterface) {
-            throw new Exception\TypeConverterException('Type converter for "' . $source . '" -> "' . $targetType . '" not found.');
+            throw new Exception\TypeConverterException(
+                'Type converter for "' . $source . '" -> "' . $targetType . '" not found.',
+                1476045062
+            );
         }
 
         $convertedChildProperties = [];
@@ -245,7 +248,10 @@ class PropertyMapper implements \TYPO3\CMS\Core\SingletonInterface
         }
 
         if ($converter === null) {
-            throw new Exception\TypeConverterException('No converter found which can be used to convert from "' . $sourceType . '" to "' . $targetType . '".');
+            throw new Exception\TypeConverterException(
+                'No converter found which can be used to convert from "' . $sourceType . '" to "' . $targetType . '".',
+                1476044883
+            );
         }
 
         return $converter;
index f4318df..5788850 100644 (file)
@@ -195,7 +195,10 @@ class PersistentObjectConverter extends ObjectConverter
             }
         } else {
             if ($configuration === null || $configuration->getConfigurationValue(\TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter::class, self::CONFIGURATION_CREATION_ALLOWED) !== true) {
-                throw new \TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyMappingConfigurationException('Creation of objects not allowed. To enable this, you need to set the PropertyMappingConfiguration Value "CONFIGURATION_CREATION_ALLOWED" to TRUE');
+                throw new \TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyMappingConfigurationException(
+                    'Creation of objects not allowed. To enable this, you need to set the PropertyMappingConfiguration Value "CONFIGURATION_CREATION_ALLOWED" to TRUE',
+                    1476044961
+                );
             }
             $object = $this->buildObject($convertedChildProperties, $targetType);
         }
index eb64bd9..c530e79 100644 (file)
@@ -117,7 +117,7 @@ class ObjectAccess
             if (property_exists($subject, $propertyName)) {
                 return $subject->{$propertyName};
             } else {
-                throw new Exception\PropertyNotAccessibleException('The property "' . $propertyName . '" on the subject does not exist.', 1302855001);
+                throw new Exception\PropertyNotAccessibleException('The property "' . $propertyName . '" on the subject does not exist.', 1476109666);
             }
         }
 
index 0db7dcf..f71789d 100644 (file)
@@ -59,7 +59,8 @@ class BlogController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
             parent::processRequest($request, $response);
         } catch (\TYPO3\CMS\Extbase\Property\Exception $exception) {
             throw new \RuntimeException(
-                $this->getRuntimeIdentifier() . ': ' . $exception->getMessage() . ' (' . $exception->getCode() . ')'
+                $this->getRuntimeIdentifier() . ': ' . $exception->getMessage() . ' (' . $exception->getCode() . ')',
+                1476122222
             );
         }
     }
index 77efbf7..dae64b0 100644 (file)
@@ -106,7 +106,13 @@ class RequestBuilderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         // mocked method ("getObjectNameByClassName") does not exist _if the mock object is not used_.
         $this->mockCommandManager->getCommandByIdentifier('some_extension_name:default:list');
         $mockCommandManager = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager::class);
-        $mockCommandManager->expects($this->any())->method('getCommandByIdentifier')->with('test:default:list')->will($this->throwException(new \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchCommandException()));
+        $mockCommandManager
+            ->expects($this->any())
+            ->method('getCommandByIdentifier')
+            ->with('test:default:list')
+            ->will($this->throwException(
+                new \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchCommandException('testing', 1476050312))
+            );
         $this->requestBuilder->_set('commandManager', $mockCommandManager);
         $request = $this->requestBuilder->build('test:default:list');
         $this->assertSame(\TYPO3\CMS\Extbase\Command\HelpCommandController::class, $request->getControllerObjectName());
index dc7d7c7..c9ff43e 100644 (file)
@@ -93,7 +93,7 @@ class CommandControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                 $this->returnCallback(
                     function () use ($mockedUserAuthentication) {
                         if ($mockedUserAuthentication->user['admin'] !== 1) {
-                            throw new \Exception('User role is not admin');
+                            throw new \Exception('User role is not admin', 1476050222);
                         }
                     }
                 ));
index 4f504f3..7efc3e7 100644 (file)
@@ -307,7 +307,11 @@ class PersistentObjectConverterTest extends UnitTestCase
         $source = [
             '__identity' => 666
         ];
-        $this->mockPersistenceManager->expects($this->any())->method('getObjectByIdentifier')->with(666)->will($this->throwException(new DuplicateObjectException));
+        $this->mockPersistenceManager
+            ->expects($this->any())
+            ->method('getObjectByIdentifier')
+            ->with(666)
+            ->will($this->throwException(new DuplicateObjectException('testing', 1476107580)));
         $this->converter->convertFrom($source, 'SomeType');
     }
 
@@ -338,7 +342,11 @@ class PersistentObjectConverterTest extends UnitTestCase
         $expectedObject = new \TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSetters();
         $expectedObject->property1 = 'bar';
 
-        $this->mockReflectionService->expects($this->any())->method('getMethodParameters')->with(\TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSetters::class, '__construct')->will($this->throwException(new \ReflectionException()));
+        $this->mockReflectionService
+            ->expects($this->any())
+            ->method('getMethodParameters')
+            ->with(\TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSetters::class, '__construct')
+            ->will($this->throwException(new \ReflectionException('testing', 1476107618)));
         $configuration = $this->buildConfiguration([PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED => true]);
         $result = $this->converter->convertFrom($source, \TYPO3\CMS\Extbase\Tests\Fixture\ClassWithSetters::class, $convertedChildProperties, $configuration);
         $this->assertEquals($expectedObject, $result);
index 875ee74..2fe4af1 100644 (file)
@@ -83,7 +83,7 @@ class ObjectAccessTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function getPropertyThrowsExceptionIfPropertyDoesNotExist()
     {
         $this->expectException(PropertyNotAccessibleException::class);
-        $this->expectExceptionCode(1302855001);
+        $this->expectExceptionCode(1476109666);
         \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($this->dummyObject, 'notExistingProperty');
     }
 
index a2164b1..a1b5056 100644 (file)
@@ -45,7 +45,7 @@ class TaskTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         $this->expectException(\Exception::class);
         // @TODO expectExceptionCode is 0
-        $this->taskExecutor->expects($this->once())->method('execute')->will($this->throwException(new \Exception()));
+        $this->taskExecutor->expects($this->once())->method('execute')->will($this->throwException(new \Exception('testing', 1476107518)));
         $this->task->_set('taskExecutor', $this->taskExecutor);
         $this->task->expects($this->once())->method('logException');
         $this->task->execute();
index cc95522..a55a58f 100644 (file)
@@ -94,7 +94,7 @@ class ConfigurationController extends AbstractModuleController
             if ($extension->getCategory() === Extension::DISTRIBUTION_CATEGORY) {
                 $this->redirect('welcome', 'Distribution', null, ['extension' => $extension->getUid()]);
             }
-            throw new ExtensionManagerException('The extension ' . $extKey . ' has no configuration.');
+            throw new ExtensionManagerException('The extension ' . $extKey . ' has no configuration.', 1476047775);
         }
     }
 
index e584394..64fabba 100644 (file)
@@ -119,7 +119,7 @@ class UploadExtensionFileController extends AbstractController
         if (Bootstrap::usesComposerClassLoading()) {
             throw new ExtensionManagerException(
                 'Composer mode is active. You are not allowed to upload any extension file.',
-                1444725828821
+                1444725828
             );
         }
     }
@@ -136,7 +136,7 @@ class UploadExtensionFileController extends AbstractController
         if (Bootstrap::usesComposerClassLoading()) {
             throw new ExtensionManagerException(
                 'Composer mode is active. You are not allowed to upload any extension file.',
-                1444725853814
+                1444725853
             );
         }
         $file = $_FILES['tx_extensionmanager_tools_extensionmanagerextensionmanager'];
index 3c688bb..3b4e430 100644 (file)
@@ -117,7 +117,7 @@ class Dependency extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
         if (in_array($type, self::$dependencyTypes)) {
             $this->type = $type;
         } else {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException($type . ' was not a valid dependency type.');
+            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException($type . ' was not a valid dependency type.', 1476122402);
         }
     }
 
index 00bf2ef..bf7a619 100644 (file)
@@ -120,7 +120,10 @@ class ExtensionListUtility implements \SplObserver
         if (is_object($this->parser)) {
             $this->parser->attach($this);
         } else {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(get_class($this) . ': No XML parser available.');
+            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(
+                get_class($this) . ': No XML parser available.',
+                1476108717
+            );
         }
     }
 
index 760d717..a6c76f9 100644 (file)
@@ -46,7 +46,10 @@ class MirrorListUtility implements \SplObserver
         if (is_object($this->parser)) {
             $this->parser->attach($this);
         } else {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(get_class($this) . ': No XML parser available.', 1342640390);
+            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(
+                get_class($this) . ': No XML parser available.',
+                1476108687
+            );
         }
     }
 
index a28fa37..1903abf 100644 (file)
@@ -54,7 +54,10 @@ class ExtensionXmlPullParser extends AbstractExtensionXmlParser
             throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException('Unable to create XML parser.', 1342640540);
         }
         if ($this->objXml->open($file, 'utf-8') === false) {
-            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(sprintf('Unable to open file resource %s.', $file));
+            throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(
+                sprintf('Unable to open file resource %s.', $file),
+                1476108651
+            );
         }
         while ($this->objXml->read()) {
             if ($this->objXml->nodeType == \XMLReader::ELEMENT) {
index 1c667de..1067c31 100644 (file)
@@ -28,7 +28,7 @@ class DownloadControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function installFromTerReturnsArrayWithBooleanResultAndErrorArrayWhenExtensionManagerExceptionIsThrown()
     {
         $dummyExceptionMessage = 'exception message';
-        $dummyException = new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException($dummyExceptionMessage);
+        $dummyException = new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException($dummyExceptionMessage, 1476108614);
 
         $dummyExtensionName = 'dummy_extension';
         $dummyExtension = $this->getMockBuilder(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class)->getMock();
@@ -47,7 +47,7 @@ class DownloadControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             [
                 $dummyExtensionName => [
                     [
-                        'code' => 0,
+                        'code' => 1476108614,
                         'message' => $dummyExceptionMessage
                     ]
                 ]
index d3f20fd..22d3cf0 100644 (file)
@@ -519,7 +519,7 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             ->method('createNestedDirectory')
             ->will($this->returnCallback(function ($path) {
                 if (!in_array($path, ['foo/bar', 'baz/foo'])) {
-                    throw new \Exception('Path "' . $path . '" is not expected to be created');
+                    throw new \Exception('Path "' . $path . '" is not expected to be created', 1476108500);
                 }
             })
             );
index c560815..79ff761 100644 (file)
@@ -87,7 +87,7 @@ class SwitchViewHelper extends \TYPO3Fluid\Fluid\ViewHelpers\SwitchViewHelper
     public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler)
     {
         if (count($node->getChildNodes())) {
-            throw new StopCompilingException();
+            throw new StopCompilingException('switch view helper', 1476122366);
         }
     }
 }
index 67b2652..bbf13ee 100644 (file)
@@ -149,7 +149,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $this->callInaccessibleMethod($fixture, 'registerRenderMethodArguments');
         $fixture->setArguments($namedArguments);
         if ($expectsException) {
-            $exception = new \TYPO3Fluid\Fluid\Core\ViewHelper\Exception('test');
+            $exception = new \TYPO3Fluid\Fluid\Core\ViewHelper\Exception('test', 1476108352);
             $this->expectException(get_class($exception));
             $fixture->expects($this->once())->method('render')->willThrowException($exception);
             $this->assertEquals('test', $this->callInaccessibleMethod($fixture, 'callRenderMethod'));
index 195ed62..53507c0 100644 (file)
@@ -68,7 +68,7 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         $this->injectDependenciesIntoViewHelper($formViewHelper);
         $formViewHelper->_set('respectSubmittedDataValue', false);
 
-        $mockObject = new \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\ClassWithTwoGetters();
+        $mockObject = new \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\ClassWithTwoGetters('testing', 1476108385);
 
         $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(true));
         $this->viewHelperVariableContainer->get(FormViewHelper::class, 'formObject')
@@ -248,7 +248,7 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe
         $this->injectDependenciesIntoViewHelper($formFieldViewHelper);
         $arguments = ['property' => 'simple'];
         $formFieldViewHelper->expects($this->any())->method('renderHiddenIdentityField')->will(
-            $this->throwException(new \Exception('Should not be executed!!!'))
+            $this->throwException(new \Exception('Should not be executed!!!', 1476108413))
         );
         $formFieldViewHelper->_set('arguments', $arguments);
         $formFieldViewHelper->_call('addAdditionalIdentityPropertiesIfNeeded');
index edf3911..e3c3e67 100644 (file)
@@ -102,7 +102,7 @@ class CategoriesViewHelper extends AbstractMenuViewHelper
                     }
                 }
             } catch (\RuntimeException $e) {
-                throw new Exception($e->getMessage());
+                throw new Exception($e->getMessage(), 1476122186);
             }
         }
 
index 9d66e33..9f4ddac 100644 (file)
@@ -462,11 +462,11 @@ class FormBuilder
                                     $value = $filter->filter($this->getIncomingData()->getIncomingField($elementName));
                                     $this->getIncomingData()->setIncomingField($elementName, $value);
                                 } else {
-                                    throw new \RuntimeException('Class "' . $filterClassName . '" could not be loaded.');
+                                    throw new \RuntimeException('Class "' . $filterClassName . '" could not be loaded.', 1476122052);
                                 }
                             }
                         } else {
-                            throw new \RuntimeException('Class "' . $filterClassName . '" not registered via TypoScript.');
+                            throw new \RuntimeException('Class "' . $filterClassName . '" not registered via TypoScript.', 1476048485);
                         }
                     }
                 }
index 4853a25..f56bccc 100644 (file)
@@ -118,7 +118,10 @@ class ValidationBuilder
                 $ruleName = $rulesTyposcript[$key];
                 $validatorClassName = $this->typoScriptRepository->getRegisteredClassName($ruleName, 'registeredValidators');
                 if ($validatorClassName === null) {
-                    throw new \RuntimeException('Class "' . $validatorClassName . '" not registered via typoscript.');
+                    throw new \RuntimeException(
+                        'Class "' . $validatorClassName . '" not registered via typoscript.',
+                        1476048511
+                    );
                 }
                 if (
                     (int)$key
@@ -161,7 +164,10 @@ class ValidationBuilder
                             'mandatoryMessage' => $mandatoryMessage
                         ];
                     } else {
-                        throw new \RuntimeException('Class "' . $validatorClassName . '" could not be loaded.');
+                        throw new \RuntimeException(
+                            'Class "' . $validatorClassName . '" could not be loaded.',
+                            1476048550
+                        );
                     }
                 }
             }
index 8ce9616..b7b47d2 100644 (file)
@@ -111,7 +111,7 @@ EOF;
 
         // If no file-param or parameters are given, we must exit
         if (!$fileUid || !isset($parametersArray) || !is_array($parametersArray)) {
-            throw new \InvalidArgumentException('No valid fileUid given');
+            throw new \InvalidArgumentException('No valid fileUid given', 1476048455);
         }
 
         // rebuild the parameter array and check if the HMAC is correct
@@ -121,7 +121,7 @@ EOF;
         $hmacParameter = isset($this->request->getQueryParams()['md5']) ? $this->request->getQueryParams()['md5'] : null;
         $hmac = GeneralUtility::hmac(implode('|', [$fileUid, $parametersEncoded]));
         if ($hmac !== $hmacParameter) {
-            throw new \InvalidArgumentException('hash does not match');
+            throw new \InvalidArgumentException('hash does not match', 1476048456);
         }
 
         // decode the parameters Array
index 159389e..e0d0add 100644 (file)
@@ -104,7 +104,7 @@ class SqlExpectedSchemaService
                     __CLASS__,
                     gettype($sqlString)
                 ),
-                1382351456
+                1476109357
             );
         }
         return $sqlString;
index e57a2f5..9b6aee7 100644 (file)
@@ -203,8 +203,10 @@ class FrontendUserImageUpdateWizard extends AbstractUpdate
         $dbQueries[] = $queryBuilder->getSQL();
 
         if ($stmt->errorCode() > 0) {
-            throw new \RuntimeException('Database query failed. Error was: ' . implode(CRLF,
-                    $stmt->errorInfo()));
+            throw new \RuntimeException(
+                'Database query failed. Error was: ' . implode(CRLF, $stmt->errorInfo()),
+                1476050084
+            );
         }
 
         return $stmt->fetchAll();
@@ -229,7 +231,7 @@ class FrontendUserImageUpdateWizard extends AbstractUpdate
         $i = 0;
 
         if (!PATH_site) {
-            throw new \Exception('PATH_site was undefined.');
+            throw new \Exception('PATH_site was undefined.', 1476107387);
         }
 
         $storageUid = (int)$this->storage->getUid();
index b809161..abf4724 100644 (file)
@@ -106,7 +106,7 @@ class SilentConfigurationUpgradeServiceTest extends \TYPO3\CMS\Core\Tests\UnitTe
             ['BE/loginSecurityLevel', $current]
         ];
         $closure = function () {
-            throw new \RuntimeException('Path does not exist in array', 1341397869);
+            throw new \RuntimeException('Path does not exist in array', 1476109311);
         };
 
         $this->createConfigurationManagerWithMockedMethods(
@@ -259,7 +259,7 @@ class SilentConfigurationUpgradeServiceTest extends \TYPO3\CMS\Core\Tests\UnitTe
         );
 
         $closure = function () {
-            throw new \RuntimeException('Path does not exist in array', 1341397869);
+            throw new \RuntimeException('Path does not exist in array', 1476109266);
         };
 
         $this->createConfigurationManagerWithMockedMethods(
index f6043b2..a815c3b 100644 (file)
@@ -87,7 +87,7 @@ abstract class AbstractRecycleTestCase extends \TYPO3\CMS\Core\Tests\FunctionalT
         if (!is_file($path)) {
             throw new \Exception(
                 'Fixture file ' . $path . ' not found',
-                1376746261
+                1476109709
             );
         }
 
index 773b56b..9077e21 100644 (file)
@@ -137,7 +137,7 @@ class CleanerTaskTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
 
         $connection->executeUpdate(Argument::cetera())
             ->shouldBeCalled()
-            ->willThrow(new \Doctrine\DBAL\DBALException());
+            ->willThrow(new \Doctrine\DBAL\DBALException('testing', 1476122315));
 
         $this->assertFalse($this->subject->execute());
     }
index 5b6c80e..e0e61f1 100644 (file)
@@ -342,6 +342,6 @@ class SelectImageController extends AbstractLinkBrowserController
      */
     protected function getCurrentPageId()
     {
-        throw new \RuntimeException('Invalid method call. This function is not supported for image handlers', 14554996791);
+        throw new \RuntimeException('Invalid method call. This function is not supported for image handlers', 1455499679);
     }
 }
index 3058842..ce038c2 100644 (file)
@@ -68,7 +68,7 @@ class TestTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask
                 $mailsSend = $mailer->send();
                 $success = $mailsSend > 0;
             } catch (\Exception $e) {
-                throw new \TYPO3\CMS\Core\Exception($e->getMessage());
+                throw new \TYPO3\CMS\Core\Exception($e->getMessage(), 1476048416);
             }
         } else {
             // No email defined, just log the task
index afef579..b29e1ed 100644 (file)
@@ -39,7 +39,7 @@ abstract class AbstractRecord
             ->execute()
             ->fetch();
         if (empty($record)) {
-            throw new \RuntimeException('Record "' . $tableName . ': ' . $uid . '" not found');
+            throw new \RuntimeException('Record "' . $tableName . ': ' . $uid . '" not found', 1476122008);
         }
         return $record;
     }
index 09a288c..ca4479f 100644 (file)
@@ -203,7 +203,7 @@ class WorkspaceRecord extends AbstractRecord
         $stageId = (int)$stageId;
 
         if (!isset($this->internalStages[$stageId])) {
-            throw new \RuntimeException('Invalid internal stage "' . $stageId . '"');
+            throw new \RuntimeException('Invalid internal stage "' . $stageId . '"', 1476048246);
         }
 
         $record = [
index 311fba8..c57b930 100644 (file)
@@ -342,7 +342,10 @@ class ActionHandler extends AbstractHandler
         $stageRecord = WorkspaceRecord::get($this->getCurrentWorkspace())->getStage($stageId);
 
         if ($stageRecord === null) {
-            throw new \InvalidArgumentException($GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'));
+            throw new \InvalidArgumentException(
+                $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'),
+                1476044776
+            );
         }
 
         $recipients = [];
index b009de8..7b14447 100644 (file)
@@ -200,7 +200,7 @@ class MassActionHandler extends AbstractHandler
             $tce->process_cmdmap();
             $errors = $tce->errorLog;
             if (!empty($errors)) {
-                throw new \Exception(implode(', ', $errors));
+                throw new \Exception(implode(', ', $errors), 1476048278);
             }
             // Unset processed records
             foreach ($limitedCmd as $table => $recs) {
index 3b8c90c..bf18deb 100644 (file)
@@ -98,7 +98,7 @@ class GridDataService
         if (is_int($currentWorkspace)) {
             $this->currentWorkspace = $currentWorkspace;
         } else {
-            throw new \InvalidArgumentException('No such workspace defined');
+            throw new \InvalidArgumentException('No such workspace defined', 1476048304);
         }
         $data = [];
         $data['data'] = [];
index 5a07460..beaefab 100644 (file)
@@ -306,7 +306,10 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
     public function getNextStage($stageId)
     {
         if (!MathUtility::canBeInterpretedAsInteger($stageId)) {
-            throw new \InvalidArgumentException($GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'), 1291109987);
+            throw new \InvalidArgumentException(
+                $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'),
+                1291109987
+            );
         }
         $nextStage = false;
         $workspaceStageRecs = $this->getStagesForWS();
@@ -373,7 +376,10 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
     public function getPrevStage($stageId)
     {
         if (!MathUtility::canBeInterpretedAsInteger($stageId)) {
-            throw new \InvalidArgumentException($GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'));
+            throw new \InvalidArgumentException(
+                $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'),
+                1476048351
+            );
         }
         $prevStage = false;
         $workspaceStageRecs = $this->getStagesForWS();
@@ -643,7 +649,10 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
     {
         $result = null;
         if (!MathUtility::canBeInterpretedAsInteger($stageId)) {
-            throw new \InvalidArgumentException($GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'));
+            throw new \InvalidArgumentException(
+                $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:error.stageId.integer'),
+                1476048371
+            );
         }
         $workspaceStage = BackendUtility::getRecord(self::TABLE_STAGE, $stageId);
         if (is_array($workspaceStage) && isset($workspaceStage[$property])) {
index cbe99ad..1563e3f 100644 (file)
@@ -126,7 +126,7 @@ class WorkspaceService implements SingletonInterface
                 }
         }
         if ($title === false) {
-            throw new \InvalidArgumentException('No such workspace defined');
+            throw new \InvalidArgumentException('No such workspace defined', 1476045469);
         }
         return $title;
     }