[
https://issues.apache.org/jira/browse/DEFT-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roger Schildmeijer updated DEFT-148:
------------------------------------
Priority: Major
Issue Type: New Feature (was: Bug)
> wrap AsyncCallbacks
> -------------------
>
> Key: DEFT-148
> URL: https://issues.apache.org/jira/browse/DEFT-148
> Project: Deft
> Issue Type: New Feature
>
> From tornadoweb (applies to deft also):
> http.fetch("http://friendfeed-api.com/v2/feed/bret",
> callback=self.async_callback(self.on_response))
> "If you make calls to asynchronous library functions that require a callback
> (like the HTTP fetch function above), you should always wrap your callbacks
> with self.async_callback. This simple wrapper ensures that if your callback
> function raises an exception or has a programming error, a proper HTTP error
> response will be sent to the browser, and the connection will be properly
> closed."
> The async_callback wrapper function is removed in new tornado releases (>
> ~0.2.0), instead contextmanagers are used (not applicable to java, could be
> available in jdk7 with TWR).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira