If you are talking about the fill method on the flex.data.assemblers.Assembler interface, yeah by the rules of Java it can only throw runtime exceptions (those exceptions which extend from java.lang.RuntimeException).  You can add another method on your class with a different method signature that does not conflict with any method on the Assembler interface that returns a Collection.  Then add a fill-method tag in your data-management-services.xml file which points to this method (just as though you did not implement the Assembler interface).  That method can then throw whatever exception it wants, even those that extend from Exception as it is invoked via reflection.

 

When you have a fill-method tag in the definition file that matches the fill call on the client, it will be called instead of the Assembler interface method’s fill call.  

 

Jeff

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Eric D Anderson
Sent: Wednesday, July 26, 2006 5:29 PM
To: [email protected]
Cc: Eric D Anderson
Subject: RE: [flexcoders] throwing exceptions from FDS fill() method

 

Hi,

 

Are you looking to have the exception be returned to the client?  


Eric

 


From: [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] On Behalf Of Dmitry Miller
Sent: Tuesday, July 11, 2006 6:09 PM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] throwing exceptions from FDS fill() method

 

Is there a way to throw custom exception from Assembler.fill() method?
For now I have managed to throw only RuntimeException. Is this intended?

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to