Skip to content

Instantly share code, notes, and snippets.

View braydonf's full-sized avatar

Braydon Fuller braydonf

View GitHub Profile
@braydonf
braydonf / builderrors.js
Last active August 29, 2015 14:10
BuildErrors
var inherits = require('inherits');
var Point = function(){};
Point.Errors = {};
var defineErrors = function(base, specs){
specs.forEach(function(spec){
var e = function(message){
this.message = message || spec.message;
};