Coder Social home page Coder Social logo

as3-airbrake-notifier's Introduction

as3-airbrake-notifier

The as3-airbrake-notifier sends errors or better said crash reports to Airbrake. Airbrake receives the error data, collects them and displays them in an nice overview. Simply said it is a crash reporting tool like many others which are used for iOs. But Airbrake has no integration for ActionScript. This gap is filled with the as3-airbrake-notifier and the usage is very simple. A meaningful use case is the combination with the global error handling, so that every client error can be detected.


Notice

The SWC file of as3-airbrake-notifier requires the as3-yaul SWC to parse the stacktrace. as3-yaul can be found on github too.


Example

####1) Instantiate the notifier.The first two parameters are the most important. The first is the application key, which can be found on the left side of the Airbrake project overview (register first). The second one describes you environment. One of the three presets (testing, production, live) can be chosen from AirbrakeNotifier. Custom names are also supported. If it is not set, it will be 'unset'. The other parameters are optional and provide more detailed information about the application in which the error occurs.

airbrakeNotifier = new AirbrakeNotifier( "defbdb1a64105a3c8f64454dbb36b9a3", AirbrakeNotifier.ENVIRONMENT_TESTING, "Application_Version", "Host_Name", "Project_Root" );

####2) Register event listener to check if something went wrong while sending the crash report or if it was finished sucessfully.

airbrakeNotifier.addEventListener( Event.COMPLETE, handleSendAirbrakeNotificationComplete );			
airbrakeNotifier.addEventListener( HTTPStatusEvent.HTTP_STATUS, handleAirbrakeNotificationHttpStatus );			
airbrakeNotifier.addEventListener( IOErrorEvent.IO_ERROR, handleAirbrakeNotificationIoError );
airbrakeNotifier.addEventListener( SecurityErrorEvent.SECURITY_ERROR, handleAirbrakeSecurityError );

####3) Create a standard crash report. If the errorId is negative, the id will be ignored. The stackTrace of an Error object can be parsed with the StackTraceParser to an object of type StackTrace or the object is filled with custom data.

airbrakeNotifier.createCrashReport( error.errorID, error.name, error.message, StackTraceParser.parseStackTrace( error.getStackTrace() ) );

####4) Create an optional request node with information about a (failed) remote request. The most of the parameters are optional.

airbrakeNotifier.addRequestInformationsToCrashReport( "URL", "COMPONENT", "ACTION", requestParams, sessionParams, environmentParams );

####5) Finally send the crash report.

airbrakeNotifier.sendCrashReport();

More information

See the notifier API for a detailed description of values and how they are used.

Developer

The 'as3-airbrake-notifier' was developed by Stephan Partzsch and Peter Höche.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.