1 /* 2 +----------------------------------------------------------------------+ 3 | Yar - Light, concurrent RPC framework | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 2012-2013 The PHP Group | 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.01 of the PHP license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 15 | Author: Xinchen Hui <laruence@php.net> | 16 | Zhenyu Zhang <zhangzhenyu@php.net> | 17 +----------------------------------------------------------------------+ 18 */ 19 20 /* $Id$ */ 21 22 #ifndef PHP_YAR_EXCEPTION_H 23 #define PHP_YAR_EXCEPTION_H 24 25 #define YAR_ERR_OKEY 0x0 26 #define YAR_ERR_PACKAGER 0x1 27 #define YAR_ERR_PROTOCOL 0x2 28 #define YAR_ERR_REQUEST 0x4 29 #define YAR_ERR_OUTPUT 0x8 30 #define YAR_ERR_TRANSPORT 0x10 31 #define YAR_ERR_FORBIDDEN 0x20 32 #define YAR_ERR_EXCEPTION 0x40 33 #define YAR_ERR_EMPTY_RESPONSE 0x80 34 35 extern zend_class_entry *yar_server_exception_ce; 36 extern zend_class_entry *yar_server_request_exception_ce; 37 extern zend_class_entry *yar_server_protocol_exception_ce; 38 extern zend_class_entry *yar_server_packager_exception_ce; 39 extern zend_class_entry *yar_server_output_exception_ce; 40 41 extern zend_class_entry *yar_client_exception_ce; 42 extern zend_class_entry *yar_client_transport_exception_ce; 43 extern zend_class_entry *yar_client_packager_exception_ce; 44 extern zend_class_entry *yar_client_protocol_exception_ce; 45 46 extern void (*zend_orig_error_cb)(int, const char *, const unsigned, const char *, va_list); 47 48 void php_yar_error_ex(struct _yar_response *response, int type, const char *format, va_list args); 49 void php_yar_error(struct _yar_response *response, int type, const char *format, ...); 50 51 YAR_STARTUP_FUNCTION(exception); 52 53 #endif /* PHP_YAR_EXCEPTION_H */ 54 55 /* 56 * Local variables: 57 * tab-width: 4 58 * c-basic-offset: 4 59 * End: 60 * vim600: noet sw=4 ts=4 fdm=marker 61 * vim<600: noet sw=4 ts=4 62 */ 63