Copy link to clipboard
Copied
Note: I am not asking about services - it works there.
I am not getting any error events, just DataEvent.UPLOAD_COMPLETE_DATA or Event.COMPLETE event with data set to the php error message response.
Is there any way to make this work like with Services CallResponder fault event ? If yes, how do I do that ?
I've been looking a few hours for this answer and I don't seem to find how to do this. Is is possible at all?
Thanks!
You should be handling service events yourself in PHP while sending Flash back a valid error response. Keep the error handling of every language within the language that it occurs and handle it yourself properly. You should be trapping all possible errors in the typical try/catch in PHP so you can send something useful back to Flash.
Copy link to clipboard
Copied
You should be handling service events yourself in PHP while sending Flash back a valid error response. Keep the error handling of every language within the language that it occurs and handle it yourself properly. You should be trapping all possible errors in the typical try/catch in PHP so you can send something useful back to Flash.
Copy link to clipboard
Copied
thanks, I also figured it out. Fatal errors and notices in php are not supposed to be cought cause they shouldn't be there in the first place. And handling Exceptions should be with a try catch with a proper response for flash to handle when using a normal request. When using an amf service you can do that via the fault event, it has the data of the PHP Exception.
Copy link to clipboard
Copied
Glad you got it sorted, good luck!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now