Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

[Flex 4.6] Handling PHP Fatal Errors in Flex with UrlRequest in UrlLoader or FileReference ?

Explorer ,
Feb 20, 2013 Feb 20, 2013

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!

TOPICS
ActionScript
795
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 22, 2013 Feb 22, 2013

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.

Translate
LEGEND ,
Feb 22, 2013 Feb 22, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 23, 2013 Feb 23, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 24, 2013 Feb 24, 2013
LATEST

Glad you got it sorted, good luck!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines