Skip to content

Commit

Permalink
Address GitHub comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicKramer committed Jun 14, 2017
1 parent 2375460 commit d4847ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/error-reporting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ If unhandled rejections are set to be reported, then, when an unhandled rejectio

Uncaught exceptions are not reported by default. *It is recommended to process `uncaughtException`s for production-deployed applications.*

Note that uncaught exceptions are not reported by default because to do so would require adding a listener to the `uncaughtException` event. However, whether or not, and if so how, the addition of such a listener influences the execution of an application is specific to that particular application. As such, it is necessary for `uncaughtException`s to be reported manually.
Note that uncaught exceptions are not reported by default because to do so would require adding a listener to the `uncaughtException` event. Adding such a listener without knowledge of other `uncaughtException` listeners can cause interference between the event handlers or prevent the process from terminating cleanly. As such, it is necessary for `uncaughtException`s to be reported manually.

```js
var errors = require('@google-cloud/error-reporting')();
Expand Down
3 changes: 2 additions & 1 deletion packages/error-reporting/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ function Errors(initConfiguration) {
process.on('unhandledRejection', function(reason) {
console.log('UnhandledPromiseRejectionWarning: ' +
'Unhandled promise rejection: ' + reason +
'. This rejection has been reported to the error-reporting console.');
'. This rejection has been reported to the ' +
'Google Cloud Platform error-reporting console.');
that.report(reason);
});
}
Expand Down
3 changes: 2 additions & 1 deletion packages/error-reporting/system-test/testAuthClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ describe('error-reporting', function() {
setImmediate(function() {
var expected = 'UnhandledPromiseRejectionWarning: Unhandled ' +
'promise rejection: ' + rejectValue +
'. This rejection has been reported to the error-reporting console.';
'. This rejection has been reported to the ' +
'Google Cloud Platform error-reporting console.';
assert.notStrictEqual(logOutput.indexOf(expected), -1);
verifyServerResponse(function(message) {
return message.startsWith(rejectValue);
Expand Down

0 comments on commit d4847ba

Please sign in to comment.