@petzen/

BlueNocturnalKudu

JavaScript

No description

fork
loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6245351435123301","path":"main.js","file":{"path":"main.js","content":{"asEncoding":{"base64":"ZnVuY3Rpb24gY3JlYXRlRXJyb3JUeXBlKG5hbWUsIGluaXRGdW5jdGlvbikgewogICAgZnVuY3Rpb24gRShtZXNzYWdlKSB7CiAgICAgICAgdGhpcy5tZXNzYWdlID0gbWVzc2FnZTsKICAgICAgICBpZiAoRXJyb3IuY2FwdHVyZVN0YWNrVHJhY2UpCiAgICAgICAgICAgIEVycm9yLmNhcHR1cmVTdGFja1RyYWNlKHRoaXMsIHRoaXMuY29uc3RydWN0b3IpOwogICAgICAgIGVsc2UKICAgICAgICAgICAgdGhpcy5zdGFjayA9IChuZXcgRXJyb3IoKSkuc3RhY2s7CiAgICAgICAgaW5pdEZ1bmN0aW9uICYmIGluaXRGdW5jdGlvbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpOwogICAgfQogICAgRS5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKEVycm9yLnByb3RvdHlwZSk7CiAgICBFLnByb3RvdHlwZS5uYW1lID0gbmFtZTsKICAgIEUucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gRTsKICAgIHJldHVybiBFOwp9CnZhciBJbnZhbGlkU3RhdGVFcnJvciA9IGNyZWF0ZUVycm9yVHlwZSgKICAgICdJbnZhbGlkU3RhdGVFcnJvcicpOwoKdmFyIGVycm9yID0gbmV3IEludmFsaWRTdGF0ZUVycm9yKCdmb28nKTsKZnVuY3Rpb24gYXNzZXJ0KGNvbmRpdGlvbikgeyBpZiAoIWNvbmRpdGlvbikgdGhyb3cgbmV3IEVycm9yKCk7IH0KYXNzZXJ0KGVycm9yLm1lc3NhZ2UpOwphc3NlcnQoZXJyb3IgaW5zdGFuY2VvZiBJbnZhbGlkU3RhdGVFcnJvcik7ICAKYXNzZXJ0KGVycm9yIGluc3RhbmNlb2YgRXJyb3IpOyAKYXNzZXJ0KGVycm9yLm5hbWUgPT0gJ0ludmFsaWRTdGF0ZUVycm9yJyk7CmFzc2VydChlcnJvci5zdGFjayk7CmVycm9yLm1lc3NhZ2U7Cg=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function createErrorType(name, initFunction) {
    function E(message) {
        this.message = message;
        if (Error.captureStackTrace)
            Error.captureStackTrace(this, this.constructor);
        else
            this.stack = (new Error()).stack;
        initFunction && initFunction.apply(this, arguments);
    }
    E.prototype = Object.create(Error.prototype);
    E.prototype.name = name;
    E.prototype.constructor = E;
    return E;
}
var InvalidStateError = createErrorType(
    'InvalidStateError');

var error = new InvalidStateError('foo');
function assert(condition) { if (!condition) throw new Error(); }
assert(error.message);
assert(error instanceof InvalidStateError);  
assert(error instanceof Error); 
assert(error.name == 'InvalidStateError');
assert(error.stack);
error.message;
Native Browser JavaScript