function TestControllers::throwException

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/router_test_directory/src/TestControllers.php \Drupal\router_test\TestControllers::throwException()
  2. 10 core/modules/system/tests/modules/router_test_directory/src/TestControllers.php \Drupal\router_test\TestControllers::throwException()
  3. 8.9.x core/modules/system/tests/modules/router_test_directory/src/TestControllers.php \Drupal\router_test\TestControllers::throwException()

Throws an exception.

Parameters

string $message: The message to use in the exception.

Throws

\Exception Always thrown.

File

core/modules/system/tests/modules/router_test_directory/src/TestControllers.php, line 130

Class

TestControllers
Controller routines for testing the routing system.

Namespace

Drupal\router_test

Code

protected function throwException($message) {
  throw new \Exception($message);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.