Source

puffin / objects / src / exception.winxed

Full commit
namespace Python {

function exception(type, object) {
    var f = type.__new__;
    var t = f(type, 'BaseException', [object]);
    
    t.__new__ = function(cls) {
        var n = new Python.instance;
        n.__class__ = cls;
        n.__value__ = new 'Exception';

        return n;
    };
   
    return t;
}

}