Discovered in #2466197: Staging directory should not have to be writeable.

Problem/Motivation

config_get_config_directory() just throws a \Exception when the config directory type does not exist - that's way too generic.

Proposed resolution

Create a more specific exception

Remaining tasks

User interface changes

None

API changes

A new exception - but any code catching the existing exception will work because the new exception will extend (at some point) from \Exception

Comments

alexpott created an issue. See original summary.

Gabr1el’s picture

Status: Active » Needs review
FileSize
1.08 KB

Added a custom exception class and used it in config_get_config_directory().

Status: Needs review » Needs work

The last submitted patch, 2: 2696103-2.patch, failed testing.

Gabr1el’s picture

Status: Needs work » Needs review
FileSize
1.05 KB
1.38 KB

I fixed the failure reason, interdiff

alexpott’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Let's add a test for this. Would fit nicely in a KernelTest - perhaps we should add a new one in Drupal\KernelTests\Core\Config for this.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.