Skip to content

Commit 6c1e4b4

Browse files
address PR feedback
1 parent ec21135 commit 6c1e4b4

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ $ npm test
2323
To run the system tests, first create and configure a project in the Google Developers Console following the [instructions on how to run google-cloud-node][elsewhere]. After that, set the following environment variables:
2424

2525
- **GCLOUD_TESTS_PROJECT_ID**: Developers Console project's ID (e.g. bamboo-shift-455)
26-
- ***GCLOUD_TESTS_PROJECT_NUMBER*** (*optional*): Developers Console project number (e.g. 1046198160504)
2726
- **GCLOUD_TESTS_KEY**: The path to the JSON key file.
2827
- ***GCLOUD_TESTS_API_KEY*** (*optional*): An API key that can be used to test the Translate API.
2928
- ***GCLOUD_TESTS_DNS_DOMAIN*** (*optional*): A domain you own managed by Cloud DNS (expected format: `'gcloud-node.com.'`).

packages/error-reporting/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,18 @@ var errors = require('@google-cloud/error-reporting')({
4444
errors.report(new Error('Something broke!'));
4545
```
4646

47-
- *One may even catch and report application-wide uncaught errors:*
47+
- **One may even catch and report application-wide uncaught errors:**
48+
- *It is recommended to catch uncaughtExceptions for production-deployed applications*
49+
- To read more about uncaught exception handling in Node.js and what it means for your application [please click here](https://nodejs.org/api/process.html#process_event_uncaughtexception)
4850

4951
```js
5052
var errors = require('@google-cloud/error-reporting')();
51-
process.on('uncaughtException', e => errors.report(e));
53+
process.on('uncaughtException', (e) => {
54+
// Write the error to stderr.
55+
console.error(e);
56+
// Report that same error the Stackdriver Error Service
57+
errors.report(e);
58+
});
5259
```
5360

5461
1. **View reported errors:**

0 commit comments

Comments
 (0)