Skip to content

Commit 1d03b7e

Browse files
jasonpolitesjmdobry
authored andcommitted
Added code comments to error samples (#246)
1 parent 14ae0c1 commit 1d03b7e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

functions/helloworld/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ exports.helloGCS = function helloGCS (event, callback) {
108108
* @param {function} The callback function.
109109
*/
110110
exports.helloError = function helloError (event, callback) {
111+
// This WILL be reported to Stackdriver errors
111112
throw new Error('I failed you');
112113
};
113114
// [END functions_hello_error]
@@ -120,6 +121,7 @@ exports.helloError = function helloError (event, callback) {
120121
* @param {function} The callback function.
121122
*/
122123
exports.helloError2 = function helloError2 (event, callback) {
124+
// This will NOT be reported to Stackdriver errors
123125
throw 1;
124126
};
125127
// [END functions_hello_error_2]
@@ -132,6 +134,7 @@ exports.helloError2 = function helloError2 (event, callback) {
132134
* @param {function} The callback function.
133135
*/
134136
exports.helloError3 = function helloError3 (event, callback) {
137+
// This will NOT be reported to Stackdriver errors
135138
callback('I failed you');
136139
};
137140
// [END functions_hello_error_3]

0 commit comments

Comments
 (0)