Back to index

php5  5.3.10
zend_exceptions.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | Zend Engine                                                          |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 2.00 of the Zend 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.zend.com/license/2_00.txt.                                |
00011    | If you did not receive a copy of the Zend license and are unable to  |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@zend.com so we can mail you a copy immediately.              |
00014    +----------------------------------------------------------------------+
00015    | Authors: Andi Gutmans <andi@zend.com>                                |
00016    |          Marcus Boerger <helly@php.net>                              |
00017    |          Sterling Hughes <sterling@php.net>                          |
00018    |          Zeev Suraski <zeev@zend.com>                                |
00019    +----------------------------------------------------------------------+
00020 */
00021 
00022 /* $Id: zend_exceptions.h 321634 2012-01-01 13:15:04Z felipe $ */
00023 
00024 #ifndef ZEND_EXCEPTIONS_H
00025 #define ZEND_EXCEPTIONS_H
00026 
00027 BEGIN_EXTERN_C()
00028 
00029 ZEND_API void zend_exception_set_previous(zval *exception, zval *add_previous TSRMLS_DC);
00030 ZEND_API void zend_exception_save(TSRMLS_D);
00031 ZEND_API void zend_exception_restore(TSRMLS_D);
00032 
00033 void zend_throw_exception_internal(zval *exception TSRMLS_DC);
00034 
00035 void zend_register_default_exception(TSRMLS_D);
00036 
00037 ZEND_API zend_class_entry *zend_exception_get_default(TSRMLS_D);
00038 ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D);
00039 ZEND_API void zend_register_default_classes(TSRMLS_D);
00040 
00041 /* exception_ce   NULL or zend_exception_get_default() or a derived class
00042  * message        NULL or the message of the exception */
00043 ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC);
00044 ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, char *format, ...);
00045 ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC);
00046 ZEND_API void zend_clear_exception(TSRMLS_D);
00047 
00048 ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, char *message, long code, int severity TSRMLS_DC);
00049 
00050 extern ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);
00051 
00052 /* show an exception using zend_error(severity,...), severity should be E_ERROR */
00053 ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC);
00054 
00055 /* do not export, in php it's available thru spprintf directly */
00056 int zend_spprintf(char **message, int max_len, char *format, ...);
00057 
00058 END_EXTERN_C()
00059 
00060 #endif
00061 
00062 /*
00063  * Local variables:
00064  * tab-width: 4
00065  * c-basic-offset: 4
00066  * indent-tabs-mode: t
00067  * End:
00068  */