diff --git a/core/includes/update.inc b/core/includes/update.inc index a46f125..50b8ae5 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -900,8 +900,8 @@ function update_variables_to_config($config_name, array $variable_map) { $module = strtok($config_name, '.'); // Load and set default configuration values. - // Throws a FileStorageReadException if there is no default configuration - // file, which is required to exist. + // Throws a StorageException if there is no default configuration file, which + // is required to exist. $file = new FileStorage(array('directory' => drupal_get_path('module', $module) . '/config')); $default_data = $file->read($config_name); diff --git a/core/lib/Drupal/Core/Config/ConfigException.php b/core/lib/Drupal/Core/Config/ConfigException.php index c60a449..8a81b6e 100644 --- a/core/lib/Drupal/Core/Config/ConfigException.php +++ b/core/lib/Drupal/Core/Config/ConfigException.php @@ -1,8 +1,15 @@ encode($data); if (!file_put_contents($this->getFilePath($name), $data)) { - throw new FileStorageException('Failed to write configuration file: ' . $this->getFilePath($name)); + throw new StorageException('Failed to write configuration file: ' . $this->getFilePath($name)); } return $this; } @@ -75,17 +75,17 @@ class FileStorage implements StorageInterface { /** * Implements StorageInterface::read(). * - * @throws FileStorageReadException + * @throws StorageException */ public function read($name) { if (!$this->exists($name)) { - throw new FileStorageReadException("Configuration file '$name' does not exist."); + throw new StorageException("Configuration file '$name' does not exist."); } $data = file_get_contents($this->getFilePath($name)); $data = $this->decode($data); if ($data === FALSE) { - throw new FileStorageReadException("Failed to decode configuration file '$name'."); + throw new StorageException("Failed to decode configuration file '$name'."); } return $data; } diff --git a/core/lib/Drupal/Core/Config/FileStorageException.php b/core/lib/Drupal/Core/Config/FileStorageException.php deleted file mode 100644 index bf3ae5f..0000000 --- a/core/lib/Drupal/Core/Config/FileStorageException.php +++ /dev/null @@ -1,10 +0,0 @@ -