Handling custom java exceptions with throwable cause in flex -
i using custom java exception provide flex client more info exception itself. exception extends exception , has attribute needed info client.
well, problem following: when build exception if invoke super() or super("message") flex client can access info properly. if build exception throwable cause, super(cause), flex client can access stacktrace.
public class myexception extends exception { private string errorcode; public string geterrorcode() { return errorcode; } public void seterrorcode(string errorcode) { this.errorcode = errorcode; } public myexception(string msg) { super(msg); } public myexception(throwable cause) { super(cause); } }
by using myexception(string msg) flex client can access errorcode using myexception(throwable cause) flex client can´t access errorcode
in flex side code is:
var faultevent : faultevent = faultevent( event ); var errormessage:errormessage = faultevent.message errormessage; var codeerror:string = errormessage.rootcause.errorcode;
do know happening?
the problem using final
. don't use final
keyword.
Comments
Post a Comment