logo       

cvs: ZendEngine2 / zend_exceptions.c: msg#00067

Subject: cvs: ZendEngine2 / zend_exceptions.c
zeev            Tue Jul 20 05:24:22 2004 EDT

  Modified files:              
    /ZendEngine2        zend_exceptions.c 
  Log:
  Add descriptions
  
  
http://cvs.php.net/diff.php/ZendEngine2/zend_exceptions.c?r1=1.66&r2=1.67&ty=u
Index: ZendEngine2/zend_exceptions.c
diff -u ZendEngine2/zend_exceptions.c:1.66 ZendEngine2/zend_exceptions.c:1.67
--- ZendEngine2/zend_exceptions.c:1.66  Thu Jul 15 18:21:36 2004
+++ ZendEngine2/zend_exceptions.c       Tue Jul 20 05:24:22 2004
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_exceptions.c,v 1.66 2004/07/15 22:21:36 helly Exp $ */
+/* $Id: zend_exceptions.c,v 1.67 2004/07/20 09:24:22 zeev Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -110,12 +110,19 @@
        return zend_default_exception_new_ex(class_type, 2 TSRMLS_CC);
 }
 
+
+/* {{{ proto Exception Exception::__clone()
+   Clone the exception object */
 ZEND_METHOD(exception, __clone)
 {
        /* Should never be executable */
        zend_throw_exception(NULL, "Cannot clone object using __clone()", 0 
TSRMLS_CC);
 }
+/* }}} */
+
 
+/* {{{ proto Exception::__construct(string message, int code)
+   Exception constructor */
 ZEND_METHOD(exception, __construct)
 {
        char  *message = NULL;
@@ -137,7 +144,11 @@
                zend_update_property_long(default_exception_ce, object, "code", 
sizeof("code")-1, code TSRMLS_CC);
        }
 }
+/* }}} */
+
 
+/* {{{ proto ErrorException::__construct(string message, int code)
+   ErrorException constructor */
 ZEND_METHOD(error_exception, __construct)
 {
        char  *message = NULL;
@@ -161,6 +172,7 @@
 
        zend_update_property_long(default_exception_ce, object, "severity", 
sizeof("severity")-1, severity TSRMLS_CC);
 }
+/* }}} */
 
 #define DEFAULT_0_PARAMS \
        if (ZEND_NUM_ARGS() > 0) { \
@@ -177,47 +189,71 @@
        zval_copy_ctor(return_value);
 }
 
+
+/* {{{ proto string Exception::getFile()
+   Get the file in which the exception occurred */
 ZEND_METHOD(exception, getFile)
 {
        DEFAULT_0_PARAMS;
 
        _default_exception_get_entry(getThis(), "file", sizeof("file")-1, 
return_value TSRMLS_CC);
 }
+/* }}} */
+
 
+/* {{{ proto int Exception::getLine()
+   Get the line in which the exception occurred */
 ZEND_METHOD(exception, getLine)
 {
        DEFAULT_0_PARAMS;
 
        _default_exception_get_entry(getThis(), "line", sizeof("line")-1, 
return_value TSRMLS_CC);
 }
+/* }}} */
+
 
+/* {{{ proto string Exception::getMessage()
+   Get the exception message */
 ZEND_METHOD(exception, getMessage)
 {
        DEFAULT_0_PARAMS;
 
        _default_exception_get_entry(getThis(), "message", sizeof("message")-1, 
return_value TSRMLS_CC);
 }
+/* }}} */
+
 
+/* {{{ proto int Exception::getCode()
+   Get the exception code */
 ZEND_METHOD(exception, getCode)
 {
        DEFAULT_0_PARAMS;
 
        _default_exception_get_entry(getThis(), "code", sizeof("code")-1, 
return_value TSRMLS_CC);
 }
+/* }}} */
 
+
+/* {{{ proto array Exception::getTrace()
+   Get the stack trace for the location in which the exception occurred */
 ZEND_METHOD(exception, getTrace)
 {
        DEFAULT_0_PARAMS;
 
        _default_exception_get_entry(getThis(), "trace", sizeof("trace")-1, 
return_value TSRMLS_CC);
 }
+/* }}} */
 
+
+/* {{{ proto int Exception::getSeverity()
+   Get the exception severity */
 ZEND_METHOD(error_exception, getSeverity)
 {
        DEFAULT_0_PARAMS;
 
        _default_exception_get_entry(getThis(), "severity", 
sizeof("severity")-1, return_value TSRMLS_CC);
 }
+/* }}} */
 
 /* {{{ ZEND_METHOD(exception, gettraceasstring) */
 #define TRACE_APPEND_CHR(chr)                                            \
@@ -371,6 +407,9 @@
        return ZEND_HASH_APPLY_KEEP;
 }
 
+
+/* {{{ proto string Exception::getTraceAsString()
+   Obtain the backtrace for the exception as a string (instead of an array) */
 ZEND_METHOD(exception, getTraceAsString)
 {
        zval *trace;
@@ -401,6 +440,9 @@
        return len;
 }
 
+
+/* {{{ proto string Exception::__toString()
+   Obtain the string representation of the Exception object */
 ZEND_METHOD(exception, __toString)
 {
        zval message, file, line, *trace;
@@ -459,6 +501,7 @@
 
        RETURN_STRINGL(str, len, 0);
 }
+/* }}} */
 
 /* 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

-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe