Jump to content

Unable to call method on an exception object.


witheredOldMale

Recommended Posts

After calling a method that throws an exception, I do

 

zval *ex = EG(exception);

 

if(ex != NULL)

 

{

 

zend_class_entry *exce = Z_OBJCE_P(ex);

 

zval *zmsg = zend_call_method(&ex,exce,NULL,"getMessage",11,&zCtorRet,0,NULL,NULL);

 

char *msg = Z_STRVAL_P(zmsg);

 

}

 

 

 

It fails with

 

<b>Fatal error</b>:  Couldn't find implementation for method Exception::getMessage

 

 

 

What’s wrong here?

 

 

 

Thanks

 

OldMale.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.