From: Umherirrender Date: Wed, 6 Feb 2019 18:39:20 +0000 (+0100) Subject: Move exceptions JobQueueError to own file X-Git-Tag: 1.34.0-rc.0~2919^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=fa29c3c09d7d653ff8b89c309c8f487681e36031 Move exceptions JobQueueError to own file Change-Id: Ibd67358cb7a14497dce8a3982ceba3b4300bdd65 --- diff --git a/.phpcs.xml b/.phpcs.xml index 21dbe818d1..fe6cee7691 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -233,7 +233,6 @@ */includes/HistoryBlob\.php */includes/htmlform/HTMLFormElement\.php */includes/jobqueue/aggregator/JobQueueAggregator\.php - */includes/jobqueue/JobQueue\.php */includes/libs/filebackend/FileBackendStore\.php */includes/libs/filebackend/FSFileBackend\.php */includes/libs/filebackend/SwiftFileBackend\.php diff --git a/autoload.php b/autoload.php index 22f9737d49..3b04dfc172 100644 --- a/autoload.php +++ b/autoload.php @@ -708,14 +708,14 @@ $wgAutoloadLocalClasses = [ 'JobQueueAggregator' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregator.php', 'JobQueueAggregatorNull' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregator.php', 'JobQueueAggregatorRedis' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php', - 'JobQueueConnectionError' => __DIR__ . '/includes/jobqueue/JobQueue.php', + 'JobQueueConnectionError' => __DIR__ . '/includes/jobqueue/exception/JobQueueConnectionError.php', 'JobQueueDB' => __DIR__ . '/includes/jobqueue/JobQueueDB.php', 'JobQueueEnqueueUpdate' => __DIR__ . '/includes/deferred/JobQueueEnqueueUpdate.php', - 'JobQueueError' => __DIR__ . '/includes/jobqueue/JobQueue.php', + 'JobQueueError' => __DIR__ . '/includes/jobqueue/exception/JobQueueError.php', 'JobQueueFederated' => __DIR__ . '/includes/jobqueue/JobQueueFederated.php', 'JobQueueGroup' => __DIR__ . '/includes/jobqueue/JobQueueGroup.php', 'JobQueueMemory' => __DIR__ . '/includes/jobqueue/JobQueueMemory.php', - 'JobQueueReadOnlyError' => __DIR__ . '/includes/jobqueue/JobQueue.php', + 'JobQueueReadOnlyError' => __DIR__ . '/includes/jobqueue/exception/JobQueueReadOnlyError.php', 'JobQueueRedis' => __DIR__ . '/includes/jobqueue/JobQueueRedis.php', 'JobRunner' => __DIR__ . '/includes/jobqueue/JobRunner.php', 'JobSpecification' => __DIR__ . '/includes/jobqueue/JobSpecification.php', diff --git a/includes/jobqueue/JobQueue.php b/includes/jobqueue/JobQueue.php index 4f4728d917..171fe35550 100644 --- a/includes/jobqueue/JobQueue.php +++ b/includes/jobqueue/JobQueue.php @@ -724,17 +724,3 @@ abstract class JobQueue { $stats->updateCount( "jobqueue.{$key}.{$type}", $delta ); } } - -/** - * @ingroup JobQueue - * @since 1.22 - */ -class JobQueueError extends MWException { -} - -class JobQueueConnectionError extends JobQueueError { -} - -class JobQueueReadOnlyError extends JobQueueError { - -} diff --git a/includes/jobqueue/exception/JobQueueConnectionError.php b/includes/jobqueue/exception/JobQueueConnectionError.php new file mode 100644 index 0000000000..7f32f23734 --- /dev/null +++ b/includes/jobqueue/exception/JobQueueConnectionError.php @@ -0,0 +1,29 @@ +