Move Exceptions to own namespace
authorjoshuaruesweg <ruesweg@woltlab.com>
Thu, 4 Mar 2021 16:10:39 +0000 (17:10 +0100)
committerjoshuaruesweg <ruesweg@woltlab.com>
Tue, 16 Mar 2021 15:19:13 +0000 (16:19 +0100)
wcfsetup/install/files/lib/system/background/job/UnfurlUrlBackgroundJob.class.php
wcfsetup/install/files/lib/system/message/unfurl/DownloadFailed.class.php [deleted file]
wcfsetup/install/files/lib/system/message/unfurl/ParsingFailed.class.php [deleted file]
wcfsetup/install/files/lib/system/message/unfurl/UnfurlResponse.class.php
wcfsetup/install/files/lib/system/message/unfurl/UrlInaccessible.class.php [deleted file]
wcfsetup/install/files/lib/system/message/unfurl/exception/DownloadFailed.class.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/message/unfurl/exception/ParsingFailed.class.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/message/unfurl/exception/UrlInaccessible.class.php [new file with mode: 0644]

index c747e160d1bbf4698e36fe87e173f5a740db8ecd..0b382176884de08cb55775638d3a8853a548c36c 100644 (file)
@@ -6,10 +6,10 @@ use BadMethodCallException;
 use GuzzleHttp\Psr7\Response;
 use wcf\data\unfurl\url\UnfurlUrl;
 use wcf\data\unfurl\url\UnfurlUrlAction;
-use wcf\system\message\unfurl\DownloadFailed;
-use wcf\system\message\unfurl\ParsingFailed;
+use wcf\system\message\unfurl\exception\DownloadFailed;
+use wcf\system\message\unfurl\exception\ParsingFailed;
+use wcf\system\message\unfurl\exception\UrlInaccessible;
 use wcf\system\message\unfurl\UnfurlResponse;
-use wcf\system\message\unfurl\UrlInaccessible;
 use wcf\util\FileUtil;
 use wcf\util\StringUtil;
 
diff --git a/wcfsetup/install/files/lib/system/message/unfurl/DownloadFailed.class.php b/wcfsetup/install/files/lib/system/message/unfurl/DownloadFailed.class.php
deleted file mode 100644 (file)
index c9e776b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-namespace wcf\system\message\unfurl;
-
-use Exception;
-
-/**
- * Denotes a (temporary) download failed. It can be retried later.
- *
- * @author      Joshua Ruesweg
- * @copyright   2001-2021 WoltLab GmbH
- * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package     WoltLabSuite\Core\System\Message\Unfurl
- * @since       5.4
- */
-class DownloadFailed extends Exception
-{
-}
diff --git a/wcfsetup/install/files/lib/system/message/unfurl/ParsingFailed.class.php b/wcfsetup/install/files/lib/system/message/unfurl/ParsingFailed.class.php
deleted file mode 100644 (file)
index 595288c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-namespace wcf\system\message\unfurl;
-
-use Exception;
-
-/**
- * Denotes a permanent parsing body failed. It should not be retried later.
- *
- * @author      Joshua Ruesweg
- * @copyright   2001-2021 WoltLab GmbH
- * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package     WoltLabSuite\Core\System\Message\Unfurl
- * @since       5.4
- */
-class ParsingFailed extends Exception
-{
-}
index 7fdaa5908feadec549df23a3a09a035b2177f28c..a038713c3bdd7c2cf03160b26353e5a59657b466 100644 (file)
@@ -11,6 +11,9 @@ use GuzzleHttp\Psr7\Response;
 use GuzzleHttp\RequestOptions;
 use Psr\Http\Client\ClientExceptionInterface;
 use wcf\system\io\HttpFactory;
+use wcf\system\message\unfurl\exception\DownloadFailed;
+use wcf\system\message\unfurl\exception\ParsingFailed;
+use wcf\system\message\unfurl\exception\UrlInaccessible;
 use wcf\util\ArrayUtil;
 use wcf\util\StringUtil;
 use wcf\util\Url;
diff --git a/wcfsetup/install/files/lib/system/message/unfurl/UrlInaccessible.class.php b/wcfsetup/install/files/lib/system/message/unfurl/UrlInaccessible.class.php
deleted file mode 100644 (file)
index 2db18a4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-namespace wcf\system\message\unfurl;
-
-use Exception;
-
-/**
- * Denotes a permanent failing url, because the url is inaccessible.
- *
- * @author      Joshua Ruesweg
- * @copyright   2001-2021 WoltLab GmbH
- * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package     WoltLabSuite\Core\System\Message\Unfurl
- * @since       5.4
- */
-class UrlInaccessible extends Exception
-{
-}
diff --git a/wcfsetup/install/files/lib/system/message/unfurl/exception/DownloadFailed.class.php b/wcfsetup/install/files/lib/system/message/unfurl/exception/DownloadFailed.class.php
new file mode 100644 (file)
index 0000000..4d163ee
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+
+namespace wcf\system\message\unfurl\exception;
+
+use Exception;
+
+/**
+ * Denotes a (temporary) download failed. It can be retried later.
+ *
+ * @author      Joshua Ruesweg
+ * @copyright   2001-2021 WoltLab GmbH
+ * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package     WoltLabSuite\Core\System\Message\Unfurl
+ * @since       5.4
+ */
+class DownloadFailed extends Exception
+{
+}
diff --git a/wcfsetup/install/files/lib/system/message/unfurl/exception/ParsingFailed.class.php b/wcfsetup/install/files/lib/system/message/unfurl/exception/ParsingFailed.class.php
new file mode 100644 (file)
index 0000000..c11296a
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+
+namespace wcf\system\message\unfurl\exception;
+
+use Exception;
+
+/**
+ * Denotes a permanent parsing body failed. It should not be retried later.
+ *
+ * @author      Joshua Ruesweg
+ * @copyright   2001-2021 WoltLab GmbH
+ * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package     WoltLabSuite\Core\System\Message\Unfurl
+ * @since       5.4
+ */
+class ParsingFailed extends Exception
+{
+}
diff --git a/wcfsetup/install/files/lib/system/message/unfurl/exception/UrlInaccessible.class.php b/wcfsetup/install/files/lib/system/message/unfurl/exception/UrlInaccessible.class.php
new file mode 100644 (file)
index 0000000..3b0586a
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+
+namespace wcf\system\message\unfurl\exception;
+
+use Exception;
+
+/**
+ * Denotes a permanent failing url, because the url is inaccessible.
+ *
+ * @author      Joshua Ruesweg
+ * @copyright   2001-2021 WoltLab GmbH
+ * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package     WoltLabSuite\Core\System\Message\Unfurl
+ * @since       5.4
+ */
+class UrlInaccessible extends Exception
+{
+}