use ParentClassException instead of InvalidArgumentException
authorJoshua Rüsweg <josh@bastelstu.be>
Fri, 9 Jun 2017 09:48:16 +0000 (11:48 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Fri, 9 Jun 2017 09:48:16 +0000 (11:48 +0200)
wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php

index 9baa3400516363c6f057886caba288bcbb0b91dd..c34985004c18aaf17bb9397cc8920c7f82152469 100755 (executable)
@@ -4,6 +4,7 @@ use wcf\data\object\type\ObjectTypeCache;
 use wcf\data\DatabaseObjectList;
 use wcf\data\ILinkableObject;
 use wcf\system\exception\ImplementationException;
+use wcf\system\exception\ParentClassException;
 use wcf\system\io\File;
 use wcf\system\request\LinkHandler;
 use wcf\system\Regex;
@@ -67,7 +68,7 @@ class SitemapRebuildWorker extends AbstractWorker {
                                        $list = $processor->getObjectList();
                                        
                                        if (!($list instanceof DatabaseObjectList)) {
-                                               throw new \InvalidArgumentException("Class '" . get_class($list) . "' is not an instance of " . DatabaseObjectList::class);
+                                               throw new ParentClassException(get_class($list), DatabaseObjectList::class);
                                        }
                                        
                                        if (SITEMAP_INDEX_TIME_FRAME > 0 && $processor->getLastModifiedColumn() !== null) {