Exceptions.c

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2006-2007 by Konstantin V. Arkhipov                     *
00003  *                                                                         *
00004  *   This program is free software; you can redistribute it and/or modify  *
00005  *   it under the terms of the GNU Lesser General Public License as        *
00006  *   published by the Free Software Foundation; either version 3 of the    *
00007  *   License, or (at your option) any later version.                       *
00008  *                                                                         *
00009  ***************************************************************************/
00010 /* $Id: Exceptions.c 4687 2007-12-09 18:57:18Z voxus $ */
00011 
00012 #include "onphp.h"
00013 
00014 #include "zend_exceptions.h"
00015 
00016 #include "core/Exceptions.h"
00017 
00018 #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 2)
00019 #define onphp_ce_Exception zend_exception_get_default()
00020 #else
00021 #define onphp_ce_Exception zend_exception_get_default(TSRMLS_C)
00022 #endif
00023 
00024 PHP_MINIT_FUNCTION(Exceptions)
00025 {
00026     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(BusinessLogicException,          Exception,          NULL, NULL);
00027     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(UnimplementedFeatureException,   Exception,          NULL, NULL);
00028     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(BaseException,                   Exception,          NULL, NULL);
00029     
00030     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(ClassNotFoundException,          BaseException,      NULL, NULL);
00031     onphp_ce_ClassNotFoundException->ce_flags |= ZEND_ACC_FINAL_CLASS;
00032     
00033     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(FileNotFoundException,           BaseException,      NULL, NULL);
00034     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(IOException,                     BaseException,      NULL, NULL);
00035     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(MissingElementException,         BaseException,      NULL, NULL);
00036     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(NetworkException,                BaseException,      NULL, NULL);
00037     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(UnsupportedMethodException,      BaseException,      NULL, NULL);
00038     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(WrongArgumentException,          BaseException,      NULL, NULL);
00039     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(WrongStateException,             BaseException,      NULL, NULL);
00040     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(DatabaseException,               BaseException,      NULL, NULL);
00041     
00042     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(DuplicateObjectException,        DatabaseException,  NULL, NULL);
00043     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(ObjectNotFoundException,         DatabaseException,  NULL, NULL);
00044     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(TooManyRowsException,            DatabaseException,  NULL, NULL);
00045     
00046     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(NetworkException,                IOException,        NULL, NULL);
00047     REGISTER_ONPHP_CUSTOM_SUB_CLASS_EX(IOTimedOutException,             IOException,        NULL, NULL);
00048     
00049     return SUCCESS;
00050 }

Generated on Sun Dec 9 21:56:23 2007 for onPHP by  doxygen 1.5.4