Expand my Community achievements bar.

Showing server side error in Flex

Avatar

Level 1
Hi all..



I have a RPC call which consists of a staging process which
throws custom error messages at different stages. I want to show
these error messages at the flex side. How this is possible? i
tried using event.fault.faultString... but it doesn't gave my error
message which i gave out at the server. Please help me out in this
issue. am kinda stuck.



Thanks In Advance
2 Replies

Avatar

Level 2
Hi Vyshak,



Let your RPC method return a string that is you error message
if the method returns void before -- an empty string means
everthing is okay. If the RPC method returns an object before, you
can add a field called errText or something to the returning
object.



Jeffrey

Avatar

Level 2
I have a Java backend which throws custom Exceptions and i
show them in flex like this:



Alert.show(error.fault.rootCause.message) where error is the
FaultEvent