Giter Site home page Giter Site logo

nappbugsnag's Introduction

NappBugsnag

This is a native module that captures exceptions thrown in Titanium and send it to Bugsnag https://bugsnag.com. The module is developed for iOS and Android.

How to use

Add the following code to alloy.js to bootup Bugsnag at app launch.

var NappBugsnag = require('dk.napp.bugsnag');

NappBugsnag.startBugsnagWithConfiguration({
	apikey: "YOUR-BUGSNAG-API-KEY"
});

// listen for Ti exceptions
Ti.App.addEventListener('uncaughtException', function (e) {
	if(ENV_PROD || ENV_TEST){
		NappBugsnag.addAttribute({
			tabName: "Titanium",
			attribute: "JSStack",
			data: JSON.stringify(e)
		});
	}
});

API

notify(object)

Send a custom non fatal exception to bugsnag.

NappBugsnag.notify({
	name: "MyException",
	reason: "Just for fun!"
});

addAttribute(object)

Add an attribute to a new tab of your choice. This is very helpful to debug why an exception is thrown.

NappBugsnag.addAttribute({
	tabName: "User",
	attribute: "username",
	data: "bob-hoskins"
});
NappBugsnag.addAttribute({
	tabName: "User",
	attribute: "email",
	data: "[email protected]"
});

clearTabWithName(string)

Clears a tab. e.g. when the user log out of the app, you want to clear the User tab.

NappBugsnag.clearTabWithName("User");

setContext(string)

Bugsnag uses the concept of "contexts" to help display and group your errors. Contexts represent what was happening in your application at the time an error occurs.

NappBugsnag.setContext("myActivity");

Changelog

  • 1.0.0
    • Initial version.

Author

Mads Møller
web: http://www.napp.dk
email: [email protected]
twitter: @nappdev

License

MIT

Copyright (c) 2010-2015 Mads Møller

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

nappbugsnag's People

Stargazers

Steven avatar Zaher Ghaibeh avatar Abdulatif Henno avatar  avatar Haroon Abbasi avatar Joseph avatar samuele coppede avatar Santiago Becerra avatar Vitor Emanuel Batista avatar lzw avatar Josh Jensen avatar Konstantin Büschel avatar Marcel Pociot avatar 衣不如新 avatar Pranav Lathigara avatar

Watchers

Mads Møller Schrøder avatar James Cloos avatar Arjan avatar

nappbugsnag's Issues

Grouping of error messages

When the app sends a report after an uncaughtException event in titanium, the grouping on the website is not working properly. The grouping makes no sense at all. There are different errors in the same group. Is this a titanium, plugin or bugsnag problem?

My app crashed !

Whan installed my app on iphone 5c device , the app crashed !

Only working on simulator?

Hi, is it just me, or the 'uncaughtException' event is only fired on simulators?
Thanks

EDIT: it was just me doing all wrong

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.