better checks for json support
[m6w6/ext-pq] / src / php_pqexc.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: pq |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2013, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13
14 #ifndef PHP_PQEXC_H
15 #define PHP_PQEXC_H
16
17 typedef enum php_pqexc_type {
18 EX_INVALID_ARGUMENT,
19 EX_RUNTIME,
20 EX_CONNECTION_FAILED,
21 EX_IO,
22 EX_ESCAPE,
23 EX_BAD_METHODCALL,
24 EX_UNINITIALIZED,
25 EX_DOMAIN,
26 EX_SQL
27 } php_pqexc_type_t;
28
29 zend_class_entry *exce(php_pqexc_type_t type);
30 zval *throw_exce(php_pqexc_type_t type TSRMLS_DC, const char *fmt, ...);
31
32 PHP_MINIT_FUNCTION(pqexc);
33
34 #endif
35
36 /*
37 * Local variables:
38 * tab-width: 4
39 * c-basic-offset: 4
40 * End:
41 * vim600: noet sw=4 ts=4 fdm=marker
42 * vim<600: noet sw=4 ts=4
43 */