function post_update_test_failing_post_update_exception

Same name and namespace in other branches
  1. 10 core/modules/system/tests/modules/post_update_test_failing/post_update_test_failing.post_update.php \post_update_test_failing_post_update_exception()
  2. 11.x core/modules/system/tests/modules/post_update_test_failing/post_update_test_failing.post_update.php \post_update_test_failing_post_update_exception()

Post update that throws an exception.

File

core/modules/system/tests/modules/post_update_test_failing/post_update_test_failing.post_update.php, line 11

Code

function post_update_test_failing_post_update_exception() {
    throw new \RuntimeException('This post update fails');
}

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