ng-stackdriver-errors

1.2.0 • Public • Published

Do it. Or do not. There is no attempt. =)

Client-side AngularJS library for Stackdriver Error Reporting

IMG

"Fear is the way to the dark side. Fear leads to anger, anger leads to hatred, hatred leads to suffering."

-- Yoda

Stories in Ready

on npm

Dependencies

Download make the dependencies of simpleGridMaterial and include in your project

Installation

$ npm install ng-stackdriver-errors --save

Module AngularJS include

require('angular');

angular.module('Requisition', [
  require('angular-animate'),
  require('angular-material'),
  require('ng-stackdriver-errors') //Component Injection
])

Implementation

Inside config:

angular.module('example').config(function($exceptionHandlerStdProvider) {

  $exceptionHandlerStdProvider.config({
    key: '<my-api-key>',
    projectId: '<my-project-id>',
    service: '<my-service>',              // (optional)
    version: '<my-service-version>'       // (optional)
  });

  $exceptionHandlerStdProvider.setUser('XUXA-010203');
});

Inside the Controller:

angular.module('example').controller('ExampleController', function ($exceptionHandlerStd) {

  try {
  ...
  } catch(e) {
    $exceptionHandlerStd.throw(e);
  }
});

Parameters

Name Type provider Controller Description
config Method true false sets the stackdriver-errors configuration data
setUser Method true true sets the user to be logged on to stackdriver-errors
throw Method true true throws an exception

Development

Edit version.js and run the command below:

$ npm run build

Metrics

Throughput Graph

Package Sidebar

Install

npm i ng-stackdriver-errors

Weekly Downloads

1

Version

1.2.0

License

MIT

Unpacked Size

7.82 kB

Total Files

9

Last publish

Collaborators

  • dgalmeida
  • lukasborges
  • miamarti