5 * Contains PHP5 version of the \AssertionError class.
9 * Emulates PHP 7 AssertionError as closely as possible.
11 * This class is declared in the global namespace. It will only be included by
12 * \Drupal\Component\Assertion\Handle for PHP5 since this class exists natively
13 * in PHP 7. Note that in PHP 7 it extends from Error, not Exception, but that
14 * isn't possible for PHP 5 - all exceptions must extend from exception.
16 class AssertionError extends Exception {
21 public function __construct($message = '', $code = 0, Exception $previous = NULL, $file = '', $line = 0) {
22 parent::__construct($message, $code, $previous);
23 // Preserve the filename and line number of the assertion failure.