GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Exceptionless.JavaScript/example/index.js at master · schneems/Exceptionless.JavaScript Expand file tree/ Copy pathindex.jsMore file actions 76 lines (69 loc) · 2.23 KB / Copy pathindex.jsFile metadata and controls76 lines (69 loc) · 2.23 KB 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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 function getNonexistentData() { /* random comment */ nonexistentArray[arguments[0]]; // second random comment; } function sendEvents(numberToSends, eventType) { for (var index = 0; index < numberToSends; index++) { switch (eventType || getRandomInt(0, 5)) { case 0: { throwIndexOutOfRange(); break; } case 1: { exceptionless.ExceptionlessClient.default.submitLog('sendEvents', 'This is a test trace message', 'trace'); break; } case 2: { exceptionless.ExceptionlessClient.default.submitLog('sendEvents', 'This is a test debug message', 'debug'); break; } case 3: { exceptionless.ExceptionlessClient.default.submitLog('sendEvents', 'This is a test info message', 'info'); break; } case 4: { exceptionless.ExceptionlessClient.default.submitLog('sendEvents', 'This is a test warn message', 'warn'); break; } case 5: { exceptionless.ExceptionlessClient.default.submitLog('sendEvents', 'This is a test error message', 'error'); break; } } } } function getRandomInt(min, max) { exceptionless.ExceptionlessClient.default.submitLog('getting random int min:' + min + ' max:' + max); return Math.floor(Math.random() * (max - min + 1)) + min; } function throwDivisionByZero() { return divide(10, 0); } function throwStringError() { return throwStringErrorImpl('string error message'); } function throwIndexOutOfRange(indexer, withCustomStacking) { try { getNonexistentData(indexer); } catch (e) { var client = exceptionless.ExceptionlessClient.default; if (withCustomStacking) { if (Math.random() < .5) { client.createException(e).setManualStackingKey('MyCustomStackingKey').submit(); } else { client.createException(e).setManualStackingInfo({ File: 'index.js', Function: 'throwIndexOutOfRange' }, 'Custom Index Out Of Range Exception').submit(); } } else { client.submitException(e); } } } function throwStringErrorImpl(message) { throw new Error(message); } function logClientConfigurationSettings() { var client = exceptionless.ExceptionlessClient.default; console.log(client.config.settings); } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |