Coverage Report

Created: 2026-06-02 06:36

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/php-src/ext/spl/spl_exceptions.c
Line
Count
Source
1
/*
2
   +----------------------------------------------------------------------+
3
   | Copyright © The PHP Group and Contributors.                          |
4
   +----------------------------------------------------------------------+
5
   | This source file is subject to the Modified BSD License that is      |
6
   | bundled with this package in the file LICENSE, and is available      |
7
   | through the World Wide Web at <https://www.php.net/license/>.        |
8
   |                                                                      |
9
   | SPDX-License-Identifier: BSD-3-Clause                                |
10
   +----------------------------------------------------------------------+
11
   | Authors: Marcus Boerger <helly@php.net>                              |
12
   +----------------------------------------------------------------------+
13
 */
14
15
#ifdef HAVE_CONFIG_H
16
# include "config.h"
17
#endif
18
19
#include "php.h"
20
#include "zend_interfaces.h"
21
#include "zend_exceptions.h"
22
#include "spl_exceptions_arginfo.h"
23
24
#include "spl_exceptions.h"
25
26
PHPAPI zend_class_entry *spl_ce_LogicException;
27
PHPAPI zend_class_entry *spl_ce_BadFunctionCallException;
28
PHPAPI zend_class_entry *spl_ce_BadMethodCallException;
29
PHPAPI zend_class_entry *spl_ce_DomainException;
30
PHPAPI zend_class_entry *spl_ce_InvalidArgumentException;
31
PHPAPI zend_class_entry *spl_ce_LengthException;
32
PHPAPI zend_class_entry *spl_ce_OutOfRangeException;
33
PHPAPI zend_class_entry *spl_ce_RuntimeException;
34
PHPAPI zend_class_entry *spl_ce_OutOfBoundsException;
35
PHPAPI zend_class_entry *spl_ce_OverflowException;
36
PHPAPI zend_class_entry *spl_ce_RangeException;
37
PHPAPI zend_class_entry *spl_ce_UnderflowException;
38
PHPAPI zend_class_entry *spl_ce_UnexpectedValueException;
39
40
#define spl_ce_Exception zend_ce_exception
41
42
/* {{{ PHP_MINIT_FUNCTION(spl_exceptions) */
43
PHP_MINIT_FUNCTION(spl_exceptions)
44
2
{
45
2
  spl_ce_LogicException = register_class_LogicException(zend_ce_exception);
46
2
  spl_ce_BadFunctionCallException = register_class_BadFunctionCallException(spl_ce_LogicException);
47
2
  spl_ce_BadMethodCallException = register_class_BadMethodCallException(spl_ce_BadFunctionCallException);
48
2
  spl_ce_DomainException = register_class_DomainException(spl_ce_LogicException);
49
2
  spl_ce_InvalidArgumentException = register_class_InvalidArgumentException(spl_ce_LogicException);
50
2
  spl_ce_LengthException = register_class_LengthException(spl_ce_LogicException);
51
2
  spl_ce_OutOfRangeException = register_class_OutOfRangeException(spl_ce_LogicException);
52
53
2
  spl_ce_RuntimeException = register_class_RuntimeException(zend_ce_exception);
54
2
  spl_ce_OutOfBoundsException = register_class_OutOfBoundsException(spl_ce_RuntimeException);
55
2
  spl_ce_OverflowException = register_class_OverflowException(spl_ce_RuntimeException);
56
2
  spl_ce_RangeException = register_class_RangeException(spl_ce_RuntimeException);
57
2
  spl_ce_UnderflowException = register_class_UnderflowException(spl_ce_RuntimeException);
58
2
  spl_ce_UnexpectedValueException = register_class_UnexpectedValueException(spl_ce_RuntimeException);
59
60
2
  return SUCCESS;
61
2
}
62
/* }}} */