Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created December 16, 2019 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/9156d98ae4cde912bf88da34ae78738d to your computer and use it in GitHub Desktop.
Save IntegerMan/9156d98ae4cde912bf88da34ae78738d to your computer and use it in GitHub Desktop.
import * as rg4js from 'raygun4js';
import { ErrorHandler } from '@angular/core';
const VERSION_NUMBER = '1.0.0.0';
rg4js('apiKey', 'YourApiKeyGoesHere');
rg4js('setVersion', VERSION_NUMBER);
rg4js('enableCrashReporting', true);
export class RaygunErrorHandler implements ErrorHandler {
handleError(e: any) {
rg4js('send', {
error: e,
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment