Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions error-reporting/snippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'use strict';

function setupImplicit() {
// [START error_reporting_setup_implicit]
// [START error_reporting_setup_nodejs_implicit]
// Imports the Google Cloud client library
const ErrorReporting = require('@google-cloud/error-reporting');

Expand All @@ -25,11 +25,11 @@ function setupImplicit() {

// Reports a simple error
errors.report('Something broke!');
// [END error_reporting_setup_implicit]
// [END error_reporting_setup_nodejs_implicit]
}

function setupExplicit() {
// [START error_reporting_setup_explicit]
// [START error_reporting_setup_nodejs_explicit]
// Imports the Google Cloud client library
const ErrorReporting = require('@google-cloud/error-reporting');

Expand All @@ -41,11 +41,11 @@ function setupExplicit() {

// Reports a simple error
errors.report('Something broke!');
// [END error_reporting_setup_explicit]
// [END error_reporting_setup_nodejs_explicit]
}

function manual() {
// [START error_reporting_manual]
// [START error_reporting_setup_nodejs_manual]
// Imports the Google Cloud client library
const ErrorReporting = require('@google-cloud/error-reporting');

Expand Down Expand Up @@ -73,11 +73,11 @@ function manual() {
errors.report('My error message', () => {
console.log('Done reporting error string!');
});
// [END error_reporting_manual]
// [END error_reporting_setup_nodejs_manual]
}

function express() {
// [START error_reporting_express]
// [START error_reporting_setup_nodejs_express]
const express = require('express');

// Imports the Google Cloud client library
Expand Down Expand Up @@ -106,7 +106,7 @@ function express() {
console.log(`App listening on port ${PORT}`);
console.log('Press Ctrl+C to quit.');
});
// [END error_reporting_express]
// [END error_reporting_setup_nodejs_express]
}

// The command-line program
Expand Down