Open csae1152 opened 6 years ago
Not yet done.
angular .module('app') .factory('$exceptionHandler', function ($log) { var airbrake = new airbrakeJs.Client({ projectId: 166985, projectKey: 'b291f40b4baa63a80df05be045a54260' }); airbrake.addFilter(function (notice) { notice.context.environment = 'production'; return notice; });
return function (exception, cause) {
$log.error(exception);
airbrake.notify({error: exception, params: {angular_cause: cause}});
};
});
Step 1: Install
Install option 1: Maven
Add the javabrake dependency through your IDE or directly to your
pom.xml
file:Install option 2: Gradle
Add javabrake to your Gradle dependencies:
Install option 3: Ivy
Add javabrake to your Ivy dependencies:
Step 2: Configuration
Copy this configuration snippet into your Java app.
(You can find your project API KEY with your project's settings)
Example of reporting a caught exception:
Visit our official GitHub repo for advanced information and integrations like log4j, log4j2, and logback.