Skip to content

Commit c687f95

Browse files
committed
Add in an example for testing with throwing a string
1 parent f4cac49 commit c687f95

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

example/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@
1212
//cool
1313
//really cool
1414
//awesome
15-
Raven.config('http://50dbe04cd1224d439e9c49bf1d0464df@localhost:8000/1').install();
15+
Raven.config('http://50dbe04cd1224d439e9c49bf1d0464df@localhost:8000/1', {
16+
whitelistUrls: [
17+
/localhost/
18+
],
19+
dataCallback: function(data) {
20+
console.log(data);
21+
return data;
22+
}
23+
}).install();
1624

1725
Raven.setUserContext({
1826
@@ -27,6 +35,7 @@
2735
<button onclick="divide(1, 0)">Sourcemap breakage</button>
2836
<button onclick="derp()">window.onerror</button>
2937
<button onclick="testOptions()">test options</button>
38+
<button onclick="throwString()">throw string</button>
3039

3140
</body>
3241
</html>

example/scratch.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ function testOptions() {
3636
throw new Error('foo');
3737
});
3838
}
39+
40+
function throwString() {
41+
throw 'oops';
42+
}

0 commit comments

Comments
 (0)