summaryrefslogtreecommitdiff
path: root/Zend/zend_default_classes.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-09-01 20:02:47 +0000
committerMarcus Boerger <helly@php.net>2003-09-01 20:02:47 +0000
commit0036ed90649a58c3dd4b07dd97269caef75e48dc (patch)
tree25afcc80554406bf3269f436b81ae4c5065c9ce7 /Zend/zend_default_classes.c
parentbef3e13cafa957c28ffcf85c1be2931b21c484ab (diff)
downloadphp-git-0036ed90649a58c3dd4b07dd97269caef75e48dc.tar.gz
Clearify this
Diffstat (limited to 'Zend/zend_default_classes.c')
-rw-r--r--Zend/zend_default_classes.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Zend/zend_default_classes.c b/Zend/zend_default_classes.c
index 4d6b6f5d81..78f54c492d 100644
--- a/Zend/zend_default_classes.c
+++ b/Zend/zend_default_classes.c
@@ -329,11 +329,16 @@ ZEND_METHOD(exception, tostring)
/* 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)