1818function setupImplicit ( ) {
1919 // [START error_reporting_setup_implicit]
2020 // Imports the Google Cloud client library
21- const ErrorReporting = require ( '@google-cloud/error-reporting' ) ;
21+ const ErrorReporting = require ( '@google-cloud/error-reporting' )
22+ . ErrorReporting ;
23+
24+ // On Node 6+ the following syntax can be used instead:
25+ // const {ErrorReporting} = require('@google-cloud/error-reporting');
2226
2327 // Instantiates a client
2428 const errors = ErrorReporting ( ) ;
@@ -31,7 +35,11 @@ function setupImplicit() {
3135function setupExplicit ( ) {
3236 // [START error_reporting_setup_explicit]
3337 // Imports the Google Cloud client library
34- const ErrorReporting = require ( '@google-cloud/error-reporting' ) ;
38+ const ErrorReporting = require ( '@google-cloud/error-reporting' )
39+ . ErrorReporting ;
40+
41+ // On Node 6+ the following syntax can be used instead:
42+ // const {ErrorReporting} = require('@google-cloud/error-reporting');
3543
3644 // Instantiates a client
3745 const errors = ErrorReporting ( {
@@ -47,7 +55,11 @@ function setupExplicit() {
4755function manual ( ) {
4856 // [START error_reporting_manual]
4957 // Imports the Google Cloud client library
50- const ErrorReporting = require ( '@google-cloud/error-reporting' ) ;
58+ const ErrorReporting = require ( '@google-cloud/error-reporting' )
59+ . ErrorReporting ;
60+
61+ // On Node 6+ the following syntax can be used instead:
62+ // const {ErrorReporting} = require('@google-cloud/error-reporting');
5163
5264 // Instantiates a client
5365 const errors = ErrorReporting ( ) ;
@@ -81,7 +93,11 @@ function express() {
8193 const express = require ( 'express' ) ;
8294
8395 // Imports the Google Cloud client library
84- const ErrorReporting = require ( '@google-cloud/error-reporting' ) ;
96+ const ErrorReporting = require ( '@google-cloud/error-reporting' )
97+ . ErrorReporting ;
98+
99+ // On Node 6+ the following syntax can be used instead:
100+ // const {ErrorReporting} = require('@google-cloud/error-reporting');
85101
86102 // Instantiates a client
87103 const errors = ErrorReporting ( ) ;
0 commit comments