18
18
function setupImplicit ( ) {
19
19
// [START error_reporting_setup_implicit]
20
20
// 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');
22
26
23
27
// Instantiates a client
24
28
const errors = ErrorReporting ( ) ;
@@ -31,7 +35,11 @@ function setupImplicit() {
31
35
function setupExplicit ( ) {
32
36
// [START error_reporting_setup_explicit]
33
37
// 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');
35
43
36
44
// Instantiates a client
37
45
const errors = ErrorReporting ( {
@@ -47,7 +55,11 @@ function setupExplicit() {
47
55
function manual ( ) {
48
56
// [START error_reporting_manual]
49
57
// 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');
51
63
52
64
// Instantiates a client
53
65
const errors = ErrorReporting ( ) ;
@@ -81,7 +93,11 @@ function express() {
81
93
const express = require ( 'express' ) ;
82
94
83
95
// 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');
85
101
86
102
// Instantiates a client
87
103
const errors = ErrorReporting ( ) ;
0 commit comments