@@ -33,8 +33,12 @@ DummyTransport.prototype.captureEvent = function(event) {
3333
3434Sentry . init ( {
3535 dsn : 'https://public@example.com/1' ,
36+ // debug: true,
3637 attachStacktrace : true ,
3738 transport : DummyTransport ,
39+ // integrations: function(old) {
40+ // return [new Sentry.Integrations.Debug({ stringify: true })].concat(old);
41+ // },
3842 beforeBreadcrumb : function ( breadcrumb ) {
3943 // Filter console logs as we use them for debugging *a lot* and they are not *that* important
4044 if ( breadcrumb . category === 'console' ) {
@@ -71,3 +75,47 @@ function foo2() {
7175 // different stack frame fns w/ same stack length
7276 bar ( ) ;
7377}
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