summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries2012-05-15 01:31:16 (GMT)
committerDries2012-05-15 01:31:16 (GMT)
commitb551b666deb2b54fea1ce171ef99cecd3518696e (patch)
tree613dcb0aa136a51defd689e26e114f68f5979d46
parent969e670eaed51bccfbee004e056aa2259cf9ca90 (diff)
- Patch #1506630 by Alan Evans, David_Rothstein: Fixed Namedspaced code throws and catches 'Exceptions' which don't exist (causing the DB settings form validation to break on install).
-rw-r--r--core/lib/Drupal/Component/Archiver/ArchiveTar.php2
-rw-r--r--core/lib/Drupal/Component/Archiver/ArchiverException.php16
-rw-r--r--core/lib/Drupal/Component/Archiver/ArchiverInterface.php2
-rw-r--r--core/lib/Drupal/Component/Archiver/Zip.php3
-rw-r--r--core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php2
-rw-r--r--core/lib/Drupal/Core/Database/Install/Tasks.php1
-rw-r--r--core/lib/Drupal/Core/Database/Query/Insert.php2
-rw-r--r--core/lib/Drupal/Core/Updater/UpdaterException.php2
8 files changed, 28 insertions, 2 deletions
diff --git a/core/lib/Drupal/Component/Archiver/ArchiveTar.php b/core/lib/Drupal/Component/Archiver/ArchiveTar.php
index f6ef506..4a8d828 100644
--- a/core/lib/Drupal/Component/Archiver/ArchiveTar.php
+++ b/core/lib/Drupal/Component/Archiver/ArchiveTar.php
@@ -42,6 +42,8 @@
namespace Drupal\Component\Archiver;
+use Exception;
+
//require_once 'PEAR.php';
//
//
diff --git a/core/lib/Drupal/Component/Archiver/ArchiverException.php b/core/lib/Drupal/Component/Archiver/ArchiverException.php
new file mode 100644
index 0000000..12af470
--- /dev/null
+++ b/core/lib/Drupal/Component/Archiver/ArchiverException.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Component\Archiver\ArchiverException.
+ */
+
+namespace Drupal\Component\Archiver;
+
+use Exception;
+
+/**
+ * Defines an exception class for Drupal\Component\Archiver\ArchiverInterface.
+ */
+class ArchiverException extends Exception {
+}
diff --git a/core/lib/Drupal/Component/Archiver/ArchiverInterface.php b/core/lib/Drupal/Component/Archiver/ArchiverInterface.php
index 12752e4..3b2dc28 100644
--- a/core/lib/Drupal/Component/Archiver/ArchiverInterface.php
+++ b/core/lib/Drupal/Component/Archiver/ArchiverInterface.php
@@ -19,6 +19,8 @@ interface ArchiverInterface {
* The full system path of the archive to manipulate. Only local files
* are supported. If the file does not yet exist, it will be created if
* appropriate.
+ *
+ * @throws Drupal\Component\Archiver\ArchiverException
*/
public function __construct($file_path);
diff --git a/core/lib/Drupal/Component/Archiver/Zip.php b/core/lib/Drupal/Component/Archiver/Zip.php
index c6f5a4c..47bfb67 100644
--- a/core/lib/Drupal/Component/Archiver/Zip.php
+++ b/core/lib/Drupal/Component/Archiver/Zip.php
@@ -32,8 +32,7 @@ class Zip implements ArchiverInterface {
public function __construct($file_path) {
$this->zip = new ZipArchive();
if ($this->zip->open($file_path) !== TRUE) {
- // @todo: This should be an interface-specific exception some day.
- throw new Exception(t('Cannot open %file_path', array('%file_path' => $file_path)));
+ throw new ArchiverException(t('Cannot open %file_path', array('%file_path' => $file_path)));
}
}
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
index ae2db87..6dc40a2 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
@@ -10,6 +10,8 @@ namespace Drupal\Core\Database\Driver\pgsql\Install;
use Drupal\Core\Database\Database;
use Drupal\Core\Database\Install\Tasks as InstallTasks;
+use Exception;
+
/**
* PostgreSQL specific install functions
*/
diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php
index ece3c7c..5d34a62 100644
--- a/core/lib/Drupal/Core/Database/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Install/Tasks.php
@@ -10,6 +10,7 @@ namespace Drupal\Core\Database\Install;
use Drupal\Core\Database\Database;
use PDO;
+use Exception;
/**
* Database installer structure.
diff --git a/core/lib/Drupal/Core/Database/Query/Insert.php b/core/lib/Drupal/Core/Database/Query/Insert.php
index e19de45..b3c4c0e 100644
--- a/core/lib/Drupal/Core/Database/Query/Insert.php
+++ b/core/lib/Drupal/Core/Database/Query/Insert.php
@@ -9,6 +9,8 @@ namespace Drupal\Core\Database\Query;
use Drupal\Core\Database\Database;
+use Exception;
+
/**
* General class for an abstracted INSERT query.
*/
diff --git a/core/lib/Drupal/Core/Updater/UpdaterException.php b/core/lib/Drupal/Core/Updater/UpdaterException.php
index fc9cb9d..aee43a6 100644
--- a/core/lib/Drupal/Core/Updater/UpdaterException.php
+++ b/core/lib/Drupal/Core/Updater/UpdaterException.php
@@ -7,6 +7,8 @@
namespace Drupal\Core\Updater;
+use Exception;
+
/**
* Defines a Exception class for the Drupal\Core\Updater\Updater class
* hierarchy.