Skip to content

Instantly share code, notes, and snippets.

@smalljam
Created December 17, 2011 14:35
Show Gist options
  • Save smalljam/1490346 to your computer and use it in GitHub Desktop.
Save smalljam/1490346 to your computer and use it in GitHub Desktop.

Revisions

  1. smalljam created this gist Dec 17, 2011.
    15 changes: 15 additions & 0 deletions Exceptions.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    (function(ns){

    function createException(name) {
    ns[name] = function(text) {
    var r = Error.call(this, text);
    r.name = name;
    return r;
    };
    }

    createException('RedefineException');
    createException('WrongTypeException');
    createException('ConfigurationMissingException');

    }(this));