Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Global error handling is now supported in Flash 10 and AIR2. More info on that here: <a href="http://help.adobe.com/en_US/air/reference/html/flash/events/UncaughtErrorEvent.html" rel="nofollow noreferrer">http://help.adobe.com/en_US/air/reference/html/flash/events/UncaughtErrorEvent.html</a></p> <p>Using that kind of functionality to catch uncaught exceptions; you can submit the trace to some web service set up specifically to grab them. Using Google App Engine is excellent for this purpose since it already has a logging feature which grabs all kinds of meta data from the client calling the application. Also, if your logs become huge for some reason - at least you wont have to worry about storing them. Google does that for you :)</p> <p>I've set up such a service as outlined below (granted it has some flaws, in particular anyone can call it and add "traces", but you could add some shared secret and post over HTTPS to have some tiny measure of security).</p> <p><strong>App Engine Logging Service</strong></p> <pre><code>#!/usr/bin/env python from google.appengine.ext import webapp from google.appengine.ext.webapp import util class MainHandler(webapp.RequestHandler): def post(self): import logging if self.request.get('trace'): logging.error(self.request.get('trace')) #Adds a row to GAE:s own logs :) self.response.out.write('trace logged') else: set_status(501) def get(self): """ Kill this function when done testing """ test_form = """ &lt;form action="/" method="POST"&gt; &lt;textarea name="trace"&gt;&lt;/textarea&gt; &lt;input type="submit"&gt; &lt;/form&gt;""" self.response.out.write(test_form) def main(): application = webapp.WSGIApplication([('/', MainHandler)], debug=False) util.run_wsgi_app(application) if __name__ == '__main__': main() </code></pre> <p>I wrote a little AIR-app containing this little test function which simply POST:ed the app engine service with the parameter "trace" specified.</p> <p><strong>Posting to the logging service (ActionScript)</strong></p> <pre><code>private function postToLogger(event:MouseEvent):void { var service:HTTPService = new HTTPService(); var parameters:Object = {'trace': "omg something went wrong"}; service.url = "https://YOURSUPERSIMPLELOGGINGSERVICE.APPSPOT.COM"; service.method = HTTPRequestMessage.POST_METHOD; service.resultFormat = HTTPService.RESULT_FORMAT_E4X; service.addEventListener("result", onSuccess); service.addEventListener("fault", onError); service.send(parameters); } </code></pre> <p>And finally, this is how it looks in the logs, lots of metadata, and of the trace you caught in your AIR app.</p> <p><img src="https://content.screencast.com/users/omgwtflolomg/folders/Jing/media/04987385-b27a-42e2-9d62-a06e5cfd234f/00000026.png" alt="Google App Engine Logging feature"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload