}
/* }}} */
-/* {{{ proto Exception Exception::__clone()
+/* {{{ proto Exception|Error Exception|Error::__clone()
Clone the exception object */
ZEND_METHOD(exception, __clone)
{
}
/* }}} */
-/* {{{ proto Exception::__construct(string message, int code [, Throwable previous])
+/* {{{ proto Exception|Error::__construct(string message, int code [, Throwable previous])
Exception constructor */
ZEND_METHOD(exception, __construct)
{
zend_class_entry *base_ce;
int argc = ZEND_NUM_ARGS();
- object = getThis();
- base_ce = zend_get_exception_base(object);
-
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, base_ce) == FAILURE) {
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|SlO!", &message, &code, &previous, zend_ce_throwable) == FAILURE) {
zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for %s([string $message [, long $code [, Throwable $previous = NULL]]])", base_ce->name->val);
return;
}
+ object = getThis();
+ base_ce = zend_get_exception_base(object);
+
if (message) {
zend_update_property_str(base_ce, object, "message", sizeof("message")-1, message);
}
int argc = ZEND_NUM_ARGS();
size_t message_len, filename_len;
- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, default_exception_ce) == FAILURE) {
+ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "|sllslO!", &message, &message_len, &code, &severity, &filename, &filename_len, &lineno, &previous, zend_ce_throwable) == FAILURE) {
zend_error(E_EXCEPTION | E_ERROR, "Wrong parameters for ErrorException([string $message [, long $code, [ long $severity, [ string $filename, [ long $lineno [, Throwable $previous = NULL]]]]]])");
return;
}
#define GET_PROPERTY_SILENT(object, name) \
zend_read_property(zend_get_exception_base(object), (object), name, sizeof(name) - 1, 1, &rv)
-/* {{{ proto string Exception::getFile()
+/* {{{ proto string Exception|Error::getFile()
Get the file in which the exception occurred */
ZEND_METHOD(exception, getFile)
{
}
/* }}} */
-/* {{{ proto int Exception::getLine()
+/* {{{ proto int Exception|Error::getLine()
Get the line in which the exception occurred */
ZEND_METHOD(exception, getLine)
{
}
/* }}} */
-/* {{{ proto string Exception::getMessage()
+/* {{{ proto string Exception|Error::getMessage()
Get the exception message */
ZEND_METHOD(exception, getMessage)
{
}
/* }}} */
-/* {{{ proto int Exception::getCode()
+/* {{{ proto int Exception|Error::getCode()
Get the exception code */
ZEND_METHOD(exception, getCode)
{
}
/* }}} */
-/* {{{ proto array Exception::getTrace()
+/* {{{ proto array Exception|Error::getTrace()
Get the stack trace for the location in which the exception occurred */
ZEND_METHOD(exception, getTrace)
{
}
/* }}} */
-/* {{{ proto string Exception::getTraceAsString()
+/* {{{ proto string Exception|Error::getTraceAsString()
Obtain the backtrace for the exception as a string (instead of an array) */
ZEND_METHOD(exception, getTraceAsString)
{
}
/* }}} */
-/* {{{ proto string Exception::getPrevious()
- Return previous Exception or NULL. */
+/* {{{ proto Throwable Exception|Error::getPrevious()
+ Return previous Throwable or NULL. */
ZEND_METHOD(exception, getPrevious)
{
zval rv;
}
/* }}} */
-/* {{{ proto string Exception::__toString()
+/* {{{ proto string Exception|Error::__toString()
Obtain the string representation of the Exception object */
ZEND_METHOD(exception, __toString)
{