Search code examples
actionscript-3apache-flexblazeds

Get stacktrace from Java (Apache Tomcat) backend on Flex frontend (connected by BlazeDS)


I'm using BlazeDS to connect my Flex front end to my Java backend, and was wondering if there is any way I can get the complete stack trace in case of an exception to be passed to the front end. When I set a break point in the exception handler in Flex, I just see a basic message, fault string etc.

Would appreciate any help.

Thanks!


Solution

  • You could create a custom exception; then catch all serverside exceptions at highest level and rethrow your custom exception with the stacktrace of the original exception as a property. You should be able to access this clientside.

    Also, if you're using Spring on the server side, the Spring BlazeDS integration can translate server-side exceptions into cleaner client-side ones using exception translators.