Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block srlowe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
srlowe / index.js
Created Mar 2, 2018
Differences error handling behaviour between mongoose versions 4 & 5
View index.js
//This is intended to illustrate differences error handling behaviour
//between mongoose versions 4 & 5
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/mongoosetest', { useMongoClient: true });
var AnimalSchema = new mongoose.Schema({
name: String
srlowe /
Last active Nov 9, 2015
Greenworks MicroTxnAuthorizationListener
// In ``:
static MicroTxnAuthorizationListener *microTxnAuthorizationListener;
NAN_METHOD(SetMicroTxnAuthorizationResponseCallback) {
Nan::HandleScope scope;
if (info.Length() < 1 || !info[0]->IsFunction()) {
THROW_BAD_ARGS("Bad arguments - [SetMicroTxnAuthorizationResponseCallback]");
You can’t perform that action at this time.