You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by After24 <vi...@after24.net> on 2020/09/24 16:06:00 UTC

AMF Error handling question in Flex

Hi,

I'm struggling to handle AMF errors using AMFPHP : if I deliberately cause a
MySQL Error during a service method call, the faultEvent dispatched on the
client doesn't contains any informations about the error cause : [RPC Fault
faultString="Echec de l'envoi" faultCode="Client.Error.MessageSend"
faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed:

But by using a web debugging proxy like Charles, I can see that the raw AMF
data of the response contains the message describing the MySQL error :
/1146: Table 'erp_dev.officeEmployee1' doesn't exist<br>  SELECT u.userId
etc./

Does anyone knows how I can access the raw data of an AMF response ? (I'm
using the mx.rpc.remoting.RemoteObject class to call the services)

Thank you.




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: AMF Error handling question in Flex

Posted by After24 <vi...@after24.net>.
Olaf,

You were correct :-)

Thank you again.

Vincent.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: AMF Error handling question in Flex

Posted by After24 <vi...@after24.net>.
Hi Olaf, 

Thank you for your answer, I will take a look in this direction.

Vincent.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: AMF Error handling question in Flex

Posted by Olaf Krueger <ma...@olafkrueger.net>.
Hi,

>Does anyone knows how I can access the raw data of an AMF response ? (I'm
>using the mx.rpc.remoting.RemoteObject class to call the services)

If I remember it correctly, an alternative is to implement a custom error
handler in order to throw an exception, something like this:

$stmt = $dbh->prepare('bogus sql');
if (!$stmt) {
   throw new Exception($dbh->errorInfo());
}


Maybe this helps,
Olaf



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/