Commit b551b666 authored by Dries's avatar Dries

- Patch #1506630 by Alan Evans, David_Rothstein: Fixed Namedspaced code throws...

- 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).
parent 969e670e
......@@ -42,6 +42,8 @@
namespace Drupal\Component\Archiver;
use Exception;
//require_once 'PEAR.php';
//
//
......
<?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 {
}
......@@ -19,6 +19,8 @@
* 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);
......
......@@ -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)));
}
}
......
......@@ -10,6 +10,8 @@
use Drupal\Core\Database\Database;
use Drupal\Core\Database\Install\Tasks as InstallTasks;
use Exception;
/**
* PostgreSQL specific install functions
*/
......
......@@ -10,6 +10,7 @@
use Drupal\Core\Database\Database;
use PDO;
use Exception;
/**
* Database installer structure.
......
......@@ -9,6 +9,8 @@
use Drupal\Core\Database\Database;
use Exception;
/**
* General class for an abstracted INSERT query.
*/
......
......@@ -7,6 +7,8 @@
namespace Drupal\Core\Updater;
use Exception;
/**
* Defines a Exception class for the Drupal\Core\Updater\Updater class
* hierarchy.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment