cvs: ZendEngine2 / zend_default_classes.c
| From: | Marcus Boerger | Date: | Mon, 01 Sep 2003 20:02:47 +0000 |
| Subject: | cvs: ZendEngine2 / zend_default_classes.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1783@lists.php.net to get a copy of this message | ||
helly Mon Sep 1 16:02:47 2003 EDT
Modified files:
/ZendEngine2 zend_default_classes.c
Log:
Clearify this
Index: ZendEngine2/zend_default_classes.c
diff -u ZendEngine2/zend_default_classes.c:1.31 ZendEngine2/zend_default_classes.c:1.32
--- ZendEngine2/zend_default_classes.c:1.31 Mon Sep 1 13:26:57 2003
+++ ZendEngine2/zend_default_classes.c Mon Sep 1 16:02:47 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_default_classes.c,v 1.31 2003/09/01 17:26:57 sebastian Exp $ */
+/* $Id: zend_default_classes.c,v 1.32 2003/09/01 20:02:47 helly Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -329,11 +329,16 @@
/* All functions that may be used in uncaught exception handlers must be final
* and must not throw exceptions. Otherwise we would need a facility to handle
- * such exceptions in that handler.
+ * such exceptions in that handler.
+ * Also all getXY() methods are final because thy serve as read only access to
+ * their corresponding properties, no more, no less. If after all you need to
+ * override somthing then it is method toString().
+ * And never try to change the state of exceptions and never implement anything
+ * that gives the user anything to accomplish this.
*/
static zend_function_entry default_exception_functions[] = {
ZEND_ME(exception, __construct, NULL, 0)
- ZEND_ME(exception, getmessage, NULL, 0) /* non final for now */
+ ZEND_ME(exception, getmessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
ZEND_ME(exception, getcode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
ZEND_ME(exception, getfile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
ZEND_ME(exception, getline, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)