5 Replies Latest reply on May 19, 2009 8:23 PM by Michael Borbor

    Flex and Coldfusion error handling

    BosDog Level 1

      Hello! I was wondering if someone could point me in the right direction regarding error handling in a Flex app thats using an HTTPSERVICE RPC to a Coldfusion component.


      If a user is entering form data in Flex and clicks submit... the data is sent via the HTTPSERVICE send method as XML to the CFC. But what if there is a Coldfusion SQL insert statement error? Say a user enters a character in a number field (now i know the best thing to do would be to have actionscript ensure that the values entered are numbers but lets keep that aside just for this example). How could I alert the user to let them know the CFC encountered a SQL error? Or better yet... alert them that everything went "A" ok and their data was successfully submitted.


      I originally thought to put CFTRY and CFCATCH around the CFC code. I could do that fine, but had trouble passing back a message string so that FLEX could use it in an Alert.Show window.