@@ -33,8 +33,12 @@ DummyTransport.prototype.captureEvent = function(event) {
33
33
34
34
Sentry . init ( {
35
35
dsn :
'https://[email protected] /1' ,
36
+ // debug: true,
36
37
attachStacktrace : true ,
37
38
transport : DummyTransport ,
39
+ // integrations: function(old) {
40
+ // return [new Sentry.Integrations.Debug({ stringify: true })].concat(old);
41
+ // },
38
42
beforeBreadcrumb : function ( breadcrumb ) {
39
43
// Filter console logs as we use them for debugging *a lot* and they are not *that* important
40
44
if ( breadcrumb . category === 'console' ) {
@@ -71,3 +75,47 @@ function foo2() {
71
75
// different stack frame fns w/ same stack length
72
76
bar ( ) ;
73
77
}
78
+
79
+ function throwNonError ( ) {
80
+ try {
81
+ throw { foo : 'bar' } ;
82
+ } catch ( o_O ) {
83
+ Sentry . captureException ( o_O ) ;
84
+ }
85
+ }
86
+
87
+ function throwError ( message ) {
88
+ message = message || 'foo' ;
89
+ try {
90
+ throw new Error ( message ) ;
91
+ } catch ( o_O ) {
92
+ Sentry . captureException ( o_O ) ;
93
+ }
94
+ }
95
+
96
+ function throwRandomError ( ) {
97
+ try {
98
+ throw new Error ( 'Exception no ' + ( Date . now ( ) + Math . random ( ) ) ) ;
99
+ } catch ( o_O ) {
100
+ Sentry . captureException ( o_O ) ;
101
+ }
102
+ }
103
+
104
+ function throwSameConsecutiveErrors ( message ) {
105
+ throwError ( message ) ;
106
+ throwError ( message ) ;
107
+ }
108
+
109
+ function captureMessage ( message ) {
110
+ message = message || 'message' ;
111
+ Sentry . captureMessage ( message ) ;
112
+ }
113
+
114
+ function captureRandomMessage ( ) {
115
+ Sentry . captureMessage ( 'Message no ' + ( Date . now ( ) + Math . random ( ) ) ) ;
116
+ }
117
+
118
+ function captureSameConsecutiveMessages ( message ) {
119
+ captureMessage ( message ) ;
120
+ captureMessage ( message ) ;
121
+ }
0 commit comments