Skip to content

Instantly share code, notes, and snippets.

View kbjr's full-sized avatar

James Brumond kbjr

View GitHub Profile
@kbjr
kbjr / gist:900217
Created April 3, 2011 05:24
YourBrowserFailsError
// For those cases when there just isn't any other explanation...
if (typeof window.YourBrowserFailsError === 'undefined') {
window.YourBrowserFailsError = function(msg) {
// Make sure it is called with "new"
if (! this instanceof YourBrowserFailsError) {
return new YourBrowserFailsError(msg);
}
// Get an actual error object for the stack
var err = (function() {
var err;
@kbjr
kbjr / callstack.js
Created April 3, 2011 04:00
A convenient way of stacking up functions
/*
|------------------------------------------------
| CallStack
|------------------------------------------------
|
| A convenient way of stacking up functions
|
| @author James Brumond
| @copyright Copyright 2011 James Brumond
| @license Dual licensed under MIT and GPL