Question

I have a Zend XMLRPC web service running, but in my class I need the script to die gracefully and would like XMLRPC not to throw an error. Is this possible?

Over view

XMLRPC client starts the call that starts an instance of a class, XMLRPC client passes query value to the object if query doesn't return a value I need the script to email me with the query and the value passed for debugging. (This all works) If nothing is found, send email and kill the process, I'm using the die() to stop the process. If results are found moves on in the process and returns a value for the XMLRPC (this part work if the query returns any results, but errors out if no results are found)

How can I kill the process and still return something back to the XMLRPC call?

I guess I could recode this functionality (this would be the correct way) just thought the die would return something and not just print something to the terminal logs

Was it helpful?

Solution

unfortunately the process can not die or exit, you must return a error message to the XMLRPC request. Using the die() or exit() results in XMLRPC throwing an error which breaks the process altogether. Now time to recode

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top