class Handle in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Assertion/Handle.php \Drupal\Component\Assertion\Handle
Handler for runtime assertion failures.
@todo Deprecate this class. https://www.drupal.org/node/3054072
Hierarchy
- class \Drupal\Component\Assertion\Handle
Expanded class hierarchy of Handle
Related topics
2 files declare their use of Handle
- bootstrap.php in core/
tests/ bootstrap.php - Autoloader for Drupal PHPUnit testing.
- DrupalKernel.php in core/
lib/ Drupal/ Core/ DrupalKernel.php
File
- core/
lib/ Drupal/ Component/ Assertion/ Handle.php, line 12
Namespace
Drupal\Component\AssertionView source
class Handle {
/**
* Ensures exceptions are thrown when an assertion fails.
*/
public static function register() {
// Since we're using exceptions, turn error warnings off.
assert_options(ASSERT_WARNING, FALSE);
// Turn exception throwing on.
assert_options(ASSERT_EXCEPTION, TRUE);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Handle:: |
public static | function | Ensures exceptions are thrown when an assertion fails. |