File tree 2 files changed +16
-3
lines changed
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 34
34
</ script >
35
35
36
36
< 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 >
38
39
< button onclick ="throwStringError() "> Throw String Message</ button >
39
40
< button onclick ="sendEvents(10) "> Send 10 random events</ button >
40
41
< 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() {
29
29
return throwStringErrorImpl ( 'string error message' ) ;
30
30
}
31
31
32
- function throwIndexOutOfRange ( indexer ) {
32
+ function throwIndexOutOfRange ( indexer , withCustomStacking ) {
33
33
try {
34
34
getNonexistentData ( indexer ) ;
35
35
} 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
+ }
37
49
}
38
50
}
39
51
You can’t perform that action at this time.
0 commit comments