File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 3434</ script >
3535
3636< button onclick ="throwDivisionByZero() "> Division By Zero</ button >
37- < button onclick ="throwIndexOutOfRange() "> Index Out Of Range</ button >
37+ < button onclick ="throwIndexOutOfRange(100) "> Index Out Of Range</ button >
38+ < button onclick ="throwIndexOutOfRange(100, true) "> Index Out Of Range with custom stacking</ button >
3839< button onclick ="throwStringError() "> Throw String Message</ button >
3940< button onclick ="sendEvents(10) "> Send 10 random events</ button >
4041< button onclick ="sendEvents(100) "> Send 100 random events</ button >
Original file line number Diff line number Diff line change @@ -29,11 +29,23 @@ function throwStringError() {
2929 return throwStringErrorImpl ( 'string error message' ) ;
3030}
3131
32- function throwIndexOutOfRange ( indexer ) {
32+ function throwIndexOutOfRange ( indexer , withCustomStacking ) {
3333 try {
3434 getNonexistentData ( indexer ) ;
3535 } catch ( e ) {
36- exceptionless . ExceptionlessClient . default . submitException ( e ) ;
36+ var client = exceptionless . ExceptionlessClient . default ;
37+ if ( withCustomStacking ) {
38+ if ( Math . random ( ) < .5 ) {
39+ client . createException ( e ) . setManualStackingKey ( 'MyCustomStackingKey' ) . submit ( ) ;
40+ } else {
41+ client . createException ( e ) . setManualStackingInfo ( {
42+ File : 'index.js' ,
43+ Function : 'throwIndexOutOfRange'
44+ } , 'Custom Index Out Of Range Exception' ) . submit ( ) ;
45+ }
46+ } else {
47+ client . submitException ( e ) ;
48+ }
3749 }
3850}
3951
You can’t perform that action at this time.
0 commit comments