incubator-awf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Stevenson (Moved) (JIRA)" <j...@apache.org>
Subject [jira] [Moved] (AWF-148) wrap AsyncCallbacks
Date Wed, 29 Feb 2012 10:10:09 GMT

     [ https://issues.apache.org/jira/browse/AWF-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tony Stevenson moved DEFT-148 to AWF-148:
-----------------------------------------

    Fix Version/s:     (was: 0.4.0)
       Issue Type: Bug  (was: New Feature)
         Reporter: Niklas Gustavsson
              Key: AWF-148  (was: DEFT-148)
          Project: Apache AWF  (was: Deft)
    
> wrap AsyncCallbacks
> -------------------
>
>                 Key: AWF-148
>                 URL: https://issues.apache.org/jira/browse/AWF-148
>             Project: Apache AWF
>          Issue Type: Bug
>            Reporter: Niklas Gustavsson
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message