search-google-geocode
Version:
Public search geographical location or address using Google Geocoding API: [reverse] geocoding.
16 lines (10 loc) • 550 B
JavaScript
var util = require('util');
const DEFAULT_MSSG = 'Google geocoder communication error';
function CommunicationError(message, constructorOptions) {
Error.call(this); // super constructor
Error.captureStackTrace(this, this.constructorOptions || this); // super helper method to include stack trace in error object
this.name = this.constructor.name; // set our function’s name as error name.
this.message = message || DEFAULT_MSSG; // set the error message
}
util.inherits(CommunicationError, Error);
module.exports = CommunicationError;