X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqexc.h;fp=src%2Fphp_pqexc.h;h=0c522aed78854e5abcdfc7200bada94256bddf6b;hp=0000000000000000000000000000000000000000;hb=9f5cecf26bd70a92ed013f31afec59e272623ac1;hpb=c566b350f18fe5d2ac5a28e82948514a8798a2b6 diff --git a/src/php_pqexc.h b/src/php_pqexc.h new file mode 100644 index 0000000..0c522ae --- /dev/null +++ b/src/php_pqexc.h @@ -0,0 +1,43 @@ +/* + +--------------------------------------------------------------------+ + | PECL :: pq | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted provided that the conditions mentioned | + | in the accompanying LICENSE file are met. | + +--------------------------------------------------------------------+ + | Copyright (c) 2013, Michael Wallner | + +--------------------------------------------------------------------+ +*/ + + +#ifndef PHP_PQEXC_H +#define PHP_PQEXC_H + +typedef enum php_pqexc_type { + EX_INVALID_ARGUMENT, + EX_RUNTIME, + EX_CONNECTION_FAILED, + EX_IO, + EX_ESCAPE, + EX_BAD_METHODCALL, + EX_UNINITIALIZED, + EX_DOMAIN, + EX_SQL +} php_pqexc_type_t; + +zend_class_entry *exce(php_pqexc_type_t type); +zval *throw_exce(php_pqexc_type_t type TSRMLS_DC, const char *fmt, ...); + +PHP_MINIT_FUNCTION(pqexc); + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 + */