Back to index

php5  5.3.10
spl_exceptions.c
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Marcus Boerger <helly@php.net>                              |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: spl_exceptions.c 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifdef HAVE_CONFIG_H
00022 # include "config.h"
00023 #endif
00024 
00025 #include "php.h"
00026 #include "php_ini.h"
00027 #include "ext/standard/info.h"
00028 #include "zend_interfaces.h"
00029 #include "zend_exceptions.h"
00030 
00031 #include "php_spl.h"
00032 #include "spl_functions.h"
00033 #include "spl_engine.h"
00034 #include "spl_exceptions.h"
00035 
00036 PHPAPI zend_class_entry *spl_ce_LogicException;
00037 PHPAPI zend_class_entry *spl_ce_BadFunctionCallException;
00038 PHPAPI zend_class_entry *spl_ce_BadMethodCallException;
00039 PHPAPI zend_class_entry *spl_ce_DomainException;
00040 PHPAPI zend_class_entry *spl_ce_InvalidArgumentException;
00041 PHPAPI zend_class_entry *spl_ce_LengthException;
00042 PHPAPI zend_class_entry *spl_ce_OutOfRangeException;
00043 PHPAPI zend_class_entry *spl_ce_RuntimeException;
00044 PHPAPI zend_class_entry *spl_ce_OutOfBoundsException;
00045 PHPAPI zend_class_entry *spl_ce_OverflowException;
00046 PHPAPI zend_class_entry *spl_ce_RangeException;
00047 PHPAPI zend_class_entry *spl_ce_UnderflowException;
00048 PHPAPI zend_class_entry *spl_ce_UnexpectedValueException;
00049 
00050 #define spl_ce_Exception zend_exception_get_default(TSRMLS_C)
00051 
00052 /* {{{ PHP_MINIT_FUNCTION(spl_exceptions) */
00053 PHP_MINIT_FUNCTION(spl_exceptions)
00054 {
00055     REGISTER_SPL_SUB_CLASS_EX(LogicException,           Exception,        NULL, NULL);
00056     REGISTER_SPL_SUB_CLASS_EX(BadFunctionCallException, LogicException,   NULL, NULL);
00057     REGISTER_SPL_SUB_CLASS_EX(BadMethodCallException,   BadFunctionCallException,   NULL, NULL);
00058     REGISTER_SPL_SUB_CLASS_EX(DomainException,          LogicException,   NULL, NULL);
00059     REGISTER_SPL_SUB_CLASS_EX(InvalidArgumentException, LogicException,   NULL, NULL);
00060     REGISTER_SPL_SUB_CLASS_EX(LengthException,          LogicException,   NULL, NULL);
00061     REGISTER_SPL_SUB_CLASS_EX(OutOfRangeException,      LogicException,   NULL, NULL);
00062 
00063     REGISTER_SPL_SUB_CLASS_EX(RuntimeException,         Exception,        NULL, NULL);
00064     REGISTER_SPL_SUB_CLASS_EX(OutOfBoundsException,     RuntimeException, NULL, NULL);
00065     REGISTER_SPL_SUB_CLASS_EX(OverflowException,        RuntimeException, NULL, NULL);
00066     REGISTER_SPL_SUB_CLASS_EX(RangeException,           RuntimeException, NULL, NULL);
00067     REGISTER_SPL_SUB_CLASS_EX(UnderflowException,       RuntimeException, NULL, NULL);
00068     REGISTER_SPL_SUB_CLASS_EX(UnexpectedValueException, RuntimeException, NULL, NULL);
00069 
00070        return SUCCESS;
00071 }
00072 /* }}} */
00073 
00074 /*
00075  * Local variables:
00076  * tab-width: 4
00077  * c-basic-offset: 4
00078  * End:
00079  * vim600: fdm=marker
00080  * vim: noet sw=4 ts=4
00081  */