Handle Errors in AMFPHP 1.9
This simple question, how to create errors in AMFPHP so that we do not send error strings either to flash or Flex and then filter the “Result” to know if what we received is an error or not.
That is some of the questions I once asked to myself, if I have in my flex app an error handler why not to send for example the error from server so that the flex app really know how to identify errors.
You use a workaround just like this:
class foo{
function _setError($msg){
trigger_error($msg, E_USER_ERROR);
}function sum($num){
if($num==5){
$this->_setError(”Doh, the number five cannot be summed”);
} else {
return $num+4;
}
} }
So this means, you send now the message directly from server and also flex recognizes that is just about to receive an error : ) whoaa!!!
Regards!













07 Jul 08 23:01
prof yo
no entiendo
nada en
ingles
asi que
no le puedo
dar un comentario
esacto
de eso
y no me
boy a arriesgar
a ponerlo en
flash
ni en mi pagina